Skip to content

v0.7.9

v0.7.9 #190

Workflow file for this run

name: Build
on:
push:
tags:
- v*
permissions:
contents: write
env:
CARGO_INCREMENTAL: 0
jobs:
build:
name: ${{ matrix.target }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
fail-fast: true
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
deb: true
rpm: true
musl: true
- os: ubuntu-latest
target: i686-unknown-linux-musl
deb: true
rpm: true
cross: true
musl: true
- os: ubuntu-latest
target: aarch64-unknown-linux-musl
deb: true
rpm: true
cross: true
musl: true
- os: ubuntu-latest
target: armv7-unknown-linux-musleabihf
deb: true
rpm: true
cross: true
musl: true
- os: ubuntu-latest
target: aarch64-linux-android
cross: true
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: windows-latest
target: aarch64-pc-windows-msvc
steps:
- uses: actions/checkout@v4
- name: Get version
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: ${{ matrix.target }}
profile: minimal
- name: Install musl
if: matrix.musl == true
run: sudo apt-get install -y musl-tools
- name: Caching
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
- name: Build
if: ${{ matrix.cross == false }}
run:
cargo build --release --workspace --locked --target ${{ matrix.target }}
- name: Build (cross)
if: ${{ matrix.cross == true}}
# cross 0.2.5 broken for android
run: |
cargo install cross --locked --git https://github.com/cross-rs/cross --rev 99b8069c0d977a14cd421ad8a3ef3255dc5802be
cross build --release --workspace --locked --target ${{ matrix.target }}
- name: Package deb
if: ${{ matrix.deb == true }}
run: |
cargo install cargo-deb --locked
cargo deb -p pay-respects --no-build --no-strip --output . --target ${{ matrix.target }}
- name: Package rpm
if: ${{ matrix.rpm == true }}
run: |
cargo install cargo-generate-rpm --locked
cargo-generate-rpm -p core -o . --target ${{ matrix.target }}
- name: Zipping files (unix)
if: runner.os != 'Windows'
run: >
tar --zstd -cf pay-respects-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}.tar.zst
LICENSE
-C target/${{ matrix.target }}/release
pay-respects
_pay-respects-module-100-runtime-rules
_pay-respects-fallback-100-request-ai
- name: Zipping files (exe)
if: runner.os == 'Windows'
run: >
7z a pay-respects-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}.zip
./LICENSE
./target/${{ matrix.target }}/release/pay-respects.exe
./target/${{ matrix.target }}/release/_pay-respects-module-100-runtime-rules.exe
./target/${{ matrix.target }}/release/_pay-respects-fallback-100-request-ai.exe
- name: Uploading to release
uses: ncipollo/release-action@v1
with:
artifacts: |
*.tar.zst
*.zip
*.deb
*.rpm
allowUpdates: true
makeLatest: true