mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 14:30:10 +01:00
ci: update for caching and more architectures
This commit is contained in:
parent
1972b25fcb
commit
7e69d2b256
1 changed files with 31 additions and 24 deletions
55
.github/workflows/build.yaml
vendored
55
.github/workflows/build.yaml
vendored
|
|
@ -10,6 +10,9 @@ jobs:
|
||||||
build:
|
build:
|
||||||
name: ${{ matrix.target }}
|
name: ${{ matrix.target }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: true
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
|
|
@ -17,9 +20,21 @@ jobs:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
target: x86_64-unknown-linux-gnu
|
target: x86_64-unknown-linux-gnu
|
||||||
deb: true
|
deb: true
|
||||||
|
- os: ubuntu-latest
|
||||||
|
target: i686-unknown-linux-gnu
|
||||||
|
deb: true
|
||||||
|
cross: true
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
target: aarch64-unknown-linux-gnu
|
target: aarch64-unknown-linux-gnu
|
||||||
deb: true
|
deb: true
|
||||||
|
cross: true
|
||||||
|
- os: ubuntu-latest
|
||||||
|
target: armv7-unknown-linux-gnueabihf
|
||||||
|
deb: true
|
||||||
|
cross: true
|
||||||
|
- os: ubuntu-latest
|
||||||
|
target: aarch64-linux-android
|
||||||
|
cross: true
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
target: x86_64-apple-darwin
|
target: x86_64-apple-darwin
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
|
|
@ -35,49 +50,41 @@ jobs:
|
||||||
id: version
|
id: version
|
||||||
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
|
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: setup Rust
|
- name: setup Rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
override: true
|
override: true
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
|
profile: minimal
|
||||||
|
|
||||||
- name: install cross
|
- name: caching
|
||||||
if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
|
uses: Swatinem/rust-cache@v2
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
with:
|
||||||
command: install
|
key: ${{ matrix.target }}
|
||||||
args: cross --locked
|
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
if: ${{ matrix.target != 'aarch64-unknown-linux-gnu' }}
|
if: ${{ matrix.cross != true}}
|
||||||
run:
|
run:
|
||||||
cargo build --release --all-features --locked --target ${{ matrix.target }}
|
cargo build --release --all-features --locked --target ${{ matrix.target }}
|
||||||
|
|
||||||
- name: build (cross)
|
- name: build (cross)
|
||||||
if: ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
|
if: ${{ matrix.cross == true}}
|
||||||
run: >
|
# cross 0.2.5 broken for android
|
||||||
cross build --release --locked --target ${{ matrix.target }}
|
run: |
|
||||||
--features=runtime-rules,request-ai
|
cargo install cross --locked --git https://github.com/cross-rs/cross --rev 99b8069c0d977a14cd421ad8a3ef3255dc5802be
|
||||||
|
cross build --release --locked --target ${{ matrix.target }} --features=runtime-rules,request-ai
|
||||||
|
|
||||||
- name: install cargo-deb
|
- name: package deb
|
||||||
if: ${{ matrix.deb == true }}
|
if: ${{ matrix.deb == true }}
|
||||||
uses: actions-rs/install@v0.1
|
run: |
|
||||||
with:
|
cargo install cargo-deb --locked
|
||||||
crate: cargo-deb
|
cargo deb --no-build --no-strip --output . --target ${{ matrix.target }}
|
||||||
|
|
||||||
- name: build deb
|
|
||||||
if: ${{ matrix.deb == true }}
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: deb
|
|
||||||
args: --no-build --no-strip --output=. --target=${{ matrix.target }}
|
|
||||||
|
|
||||||
- name: zipping files (exe)
|
- name: zipping files (exe)
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
# for some reason Windows doesn't support environment variables?
|
|
||||||
run: >
|
run: >
|
||||||
7z a pay-respects-${{ matrix.target }}.zip
|
7z a pay-respects-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}.zip
|
||||||
./target/${{ matrix.target }}/release/pay-respects.exe
|
./target/${{ matrix.target }}/release/pay-respects.exe
|
||||||
|
|
||||||
- name: zipping files (unix)
|
- name: zipping files (unix)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue