mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2024-11-19 09:52:09 +01:00
a7b67fc78d
* Try specifying graalvm download url to fetch modern native image try explicitly stating version # Add tgz+ try using simple OS to get thigns working Try runner.os * Add comment for where to find new jdks in the future
57 lines
1.9 KiB
YAML
57 lines
1.9 KiB
YAML
# Docs:
|
|
# https://github.com/scalameta/sbt-native-image#generate-native-image-from-github-actions
|
|
name: Native Image bitcoin-s-cli\
|
|
env:
|
|
DISABLE_SECP256K1: "true"
|
|
on:
|
|
push:
|
|
branches: [master, main]
|
|
tags: ["*"]
|
|
release:
|
|
types: [published]
|
|
jobs:
|
|
|
|
unix:
|
|
if: "! contains(github.event.pull_request.labels.*.name, 'documentation')"
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 60
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [macOS-latest, ubuntu-latest]
|
|
include:
|
|
- os: macOS-latest
|
|
uploaded_filename: bitcoin-s-cli-x86_64-apple-darwin
|
|
local_path: app/cli/target/native-image/bitcoin-s-cli
|
|
- os: ubuntu-latest
|
|
uploaded_filename: bitcoin-s-cli-x86_64-pc-linux
|
|
local_path: app/cli/target/native-image/bitcoin-s-cli
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: olafurpg/setup-scala@v13
|
|
with:
|
|
# from https://github.com/graalvm/graalvm-ce-builds/releases
|
|
java-version: graalvm@21.0.2=tgz+https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.2/graalvm-community-jdk-21.0.2_${{runner.os}}-x64_bin.tar.gz
|
|
- run: git fetch --tags || true
|
|
- run: sbt cli/nativeImage
|
|
shell: bash
|
|
if: ${{ matrix.os != 'windows-latest' }}
|
|
- run: echo $(pwd)
|
|
shell: bash
|
|
- uses: actions/upload-artifact@master
|
|
with:
|
|
path: ${{ matrix.local_path }}
|
|
name: ${{ matrix.uploaded_filename }}
|
|
- name: Upload release
|
|
if: github.event_name == 'release'
|
|
uses: actions/upload-release-asset@v1.0.2
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ github.event.release.upload_url }}
|
|
asset_path: ${{ matrix.local_path }}
|
|
asset_name: ${{ matrix.uploaded_filename }}
|
|
asset_content_type: application/zip |