mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-02-24 06:57:51 +01:00
58 lines
1.9 KiB
YAML
58 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
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- master
|
||
|
pull_request:
|
||
|
release:
|
||
|
types: [published]
|
||
|
jobs:
|
||
|
unix:
|
||
|
runs-on: ${{ matrix.os }}
|
||
|
strategy:
|
||
|
fail-fast: false
|
||
|
matrix:
|
||
|
os: [macOS-latest, ubuntu-latest, windows-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
|
||
|
- os: windows-latest
|
||
|
uploaded_filename: bitcoin-s-cli-x86_64-pc-win32.exe
|
||
|
local_path: app\cli\target\native-image\bitcoin-s-cli.exe
|
||
|
steps:
|
||
|
- uses: actions/checkout@v2
|
||
|
- uses: olafurpg/setup-scala@v10
|
||
|
- run: git fetch --tags || true
|
||
|
- run: sbt cli/nativeImage
|
||
|
shell: bash
|
||
|
if: ${{ matrix.os != 'windows-latest' }}
|
||
|
- run: echo $(pwd)
|
||
|
shell: bash
|
||
|
- name: sbt cliTest/test
|
||
|
shell: cmd
|
||
|
if: ${{ matrix.os == 'windows-latest' }}
|
||
|
run: >-
|
||
|
"C:\Program Files (x86)\Microsoft Visual
|
||
|
Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" && sbt
|
||
|
cli/nativeImage
|
||
|
- 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
|