Update dependencies #56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
#tags: [ 'v*' ] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
targets: [ | |
{ os: ubuntu-latest, target: x86_64-unknown-linux-musl, tool: cargo, name: linux64, ext: '' }, | |
{ os: ubuntu-latest, target: i686-unknown-linux-musl, tool: cross, name: linux32, ext: '' }, | |
{ os: ubuntu-latest, target: aarch64-unknown-linux-musl, tool: cross, name: linux-arm64, ext: '' }, | |
{ os: macos-latest, target: x86_64-apple-darwin, tool: cargo, name: mac64, ext: '' }, | |
{ os: macos-latest, target: aarch64-apple-darwin, tool: cross, name: mac-arm64, ext: '' }, | |
{ os: windows-latest, target: x86_64-pc-windows-msvc, tool: cargo, name: windows64, ext: '.exe' }, | |
{ os: windows-latest, target: i686-pc-windows-msvc, tool: cargo, name: windows32, ext: '.exe' }, | |
{ os: windows-latest, target: aarch64-pc-windows-msvc, tool: cargo, name: windows-arm64, ext: '.exe' } | |
] | |
runs-on: ${{ matrix.targets.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
target: ${{ matrix.targets.target }} | |
- uses: Swatinem/rust-cache@v2 | |
- name: Add rust target | |
run: rustup target add ${{ matrix.targets.target }} | |
- name: Setup target ${{ matrix.targets.target }} | |
if: ${{ matrix.targets.target == 'aarch64-apple-darwin' }} | |
run: | | |
echo "SDKROOT=$(xcrun -sdk macosx11.1 --show-sdk-path)" >> $GITHUB_ENV | |
echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.1 --show-sdk-platform-version)" >> $GITHUB_ENV | |
- name: Install cross | |
if: ${{ matrix.targets.tool == 'cross' }} | |
run: cargo install cross | |
- name: Build gyro2bb | |
working-directory: bin/gyro2bb/ | |
run: ${{ matrix.targets.tool }} build --target ${{ matrix.targets.target }} --release | |
- name: Strip | |
if: ${{ matrix.targets.os != 'windows-latest' }} | |
continue-on-error: true | |
working-directory: bin/gyro2bb/ | |
run: strip target/${{ matrix.targets.target }}/release/gyro2bb 2>/dev/null || true | |
- name: Copy dist | |
working-directory: bin/gyro2bb/ | |
run: | | |
mkdir ../../dist | |
mv target/${{ matrix.targets.target }}/release/gyro2bb${{ matrix.targets.ext }} ../../dist/gyro2bb-${{ matrix.targets.name }}${{ matrix.targets.ext }} | |
- name: Save Binaries | |
uses: actions/upload-artifact@v3 | |
with: | |
name: gyro2bb | |
path: dist/gyro2bb* | |
#github_release: | |
# name: Create GitHub release | |
# needs: build | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Download artifacts | |
# uses: actions/download-artifact@v3 | |
# with: | |
# name: gyro2bb | |
# | |
# - run: ls -l | |
# | |
# - name: Publish | |
# uses: softprops/action-gh-release@v1 | |
# if: startsWith(github.ref, 'refs/tags/') | |
# with: | |
# files: ./* | |