remove fs fixes, update #22
Workflow file for this run
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: ["[0-9].[0-9]+.[0-9]+"] | |
jobs: | |
create_release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
draft: false | |
generate_release_notes: false | |
prerelease: false | |
files: | | |
LICENSE | |
populate_release: | |
runs-on: ${{ matrix.os }} | |
needs: create_release | |
strategy: | |
matrix: | |
target: | |
- aarch64-apple-ios | |
- aarch64-linux-android | |
- aarch64-apple-darwin | |
- aarch64-unknown-linux-gnu | |
- aarch64-pc-windows-msvc | |
- x86_64-apple-darwin | |
- x86_64-pc-windows-msvc | |
- x86_64-unknown-linux-gnu | |
include: | |
- target: aarch64-apple-ios | |
os: macos-latest | |
binary: ctrl | |
- target: aarch64-linux-android | |
os: ubuntu-latest | |
binary: ctrl | |
- target: aarch64-apple-darwin | |
os: macos-latest | |
binary: ctrl | |
- target: aarch64-unknown-linux-gnu | |
os: ubuntu-latest | |
binary: ctrl | |
- target: aarch64-pc-windows-msvc | |
os: windows-latest | |
binary: ctrl.exe | |
- target: x86_64-apple-darwin | |
os: macos-latest | |
binary: ctrl | |
- target: x86_64-unknown-linux-gnu | |
os: ubuntu-latest | |
binary: ctrl | |
- target: x86_64-pc-windows-msvc | |
os: windows-latest | |
binary: ctrl.exe | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
- name: Patch NDK toolchain [Android (aarch64)] | |
run: bash scripts/patch_android_ndk_toolchain.sh | |
if: ${{ matrix.target == 'aarch64-linux-android' }} | |
- name: Set NDK linker path [Android (aarch64)] | |
run: echo "$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin" >> $GITHUB_PATH | |
if: ${{ matrix.target == 'aarch64-linux-android' }} | |
- name: Install GNU GCC [Linux (aarch64)] | |
run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu | |
if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }} | |
- name: Rust target add | |
run: rustup target add ${{ matrix.target }} | |
- name: Cargo build release | |
# specifying --target is required for Rust linker | |
# when cross compiling, static linking, building stdlib from source, etc | |
# https://github.com/rust-lang/rust/issues/78210 | |
run: cargo build --release --target=${{ matrix.target }} | |
- name: Rename binary | |
run: mv ${{ matrix.binary }} ${{ matrix.target }}-${{ matrix.binary }} | |
working-directory: target/${{ matrix.target }}/release | |
- name: Copy binary into release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
target/${{ matrix.target }}/release/${{ matrix.target }}-${{ matrix.binary }} |