update #92
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: | |
- v[0-9]+.* | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: taiki-e/create-gh-release-action@v1 | |
env: | |
# (required) | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
upload-assets: | |
strategy: | |
matrix: | |
include: | |
# apple | |
- target: x86_64-apple-darwin | |
os: macos-latest | |
build_tool: cargo | |
features: web, mimalloc, cross-nat | |
- target: aarch64-apple-darwin | |
os: macos-latest | |
build_tool: cargo | |
features: web, mimalloc, cross-nat | |
# windows | |
- target: x86_64-pc-windows-msvc | |
os: windows-latest | |
build_tool: cargo | |
features: web, mimalloc, cross-nat | |
- target: i686-pc-windows-msvc | |
os: windows-latest | |
build_tool: cargo | |
features: web, mimalloc, cross-nat | |
- target: aarch64-pc-windows-msvc | |
os: windows-latest | |
build_tool: cargo | |
features: web, mimalloc, cross-nat | |
# linux | |
- target: x86_64-unknown-linux-musl | |
os: ubuntu-latest | |
build_tool: cargo | |
features: web, mimalloc, cross-nat | |
- target: i686-unknown-linux-musl | |
os: ubuntu-latest | |
build_tool: cargo-zigbuild | |
features: web, mimalloc, cross-nat | |
- target: aarch64-unknown-linux-musl | |
os: ubuntu-latest | |
build_tool: cargo-zigbuild | |
features: web, mimalloc, cross-nat | |
- target: armv7-unknown-linux-gnueabihf | |
os: ubuntu-latest | |
build_tool: cargo-zigbuild | |
features: web, mimalloc, cross-nat | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
sudo apt update -y | |
sudo apt install -y musl-tools | |
if: matrix.target == 'x86_64-unknown-linux-musl' | |
- uses: taiki-e/upload-rust-binary-action@v1 | |
with: | |
target: ${{ matrix.target }} | |
# (required) | |
bin: fubuki | |
# (optional) On which platform to distribute the `.tar.gz` file. | |
# [default value: unix] | |
# [possible values: all, unix, windows, none] | |
tar: unix | |
# (optional) On which platform to distribute the `.zip` file. | |
# [default value: windows] | |
# [possible values: all, unix, windows, none] | |
zip: windows | |
build_tool: ${{ matrix.build_tool }} | |
no-default-features: true | |
features: ${{ matrix.features }} | |
env: | |
# (required) | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
RUSTUP_TOOLCHAIN: nightly | |
CARGO_TERM_COLOR: always | |
build-android: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: [ | |
aarch64-linux-android, | |
armv7-linux-androideabi, | |
i686-linux-android, | |
x86_64-linux-android | |
] | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
cargo install cross --git https://github.com/cross-rs/cross | |
echo "build ${{ matrix.target }}" | |
cross +nightly build --lib --release --no-default-features --features "cross-nat" --target ${{ matrix.target }} | |
cd target/${{ matrix.target }}/release | |
tar -czf libfubuki-${{ matrix.target }}.tar.gz libfubukil.so | |
gh release upload ${{ github.ref_name }} libfubuki-${{ matrix.target }}.tar.gz | |
env: | |
GH_TOKEN: ${{ github.token }} | |
RUSTUP_TOOLCHAIN: nightly | |
CARGO_TERM_COLOR: always |