mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 14:30:10 +01:00
ci: cache test runs
This commit is contained in:
parent
c729c6433f
commit
c7df749278
2 changed files with 17 additions and 10 deletions
20
.github/workflows/build.yaml
vendored
20
.github/workflows/build.yaml
vendored
|
|
@ -55,11 +55,11 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: get version
|
- name: Get version
|
||||||
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 toolchain
|
- name: Setup Rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
|
@ -67,36 +67,36 @@ jobs:
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
profile: minimal
|
profile: minimal
|
||||||
|
|
||||||
- name: caching
|
- name: Caching
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
key: ${{ matrix.target }}
|
key: ${{ matrix.target }}
|
||||||
|
|
||||||
- name: build
|
- name: Build
|
||||||
if: ${{ matrix.cross == false}}
|
if: ${{ matrix.cross == false}}
|
||||||
run:
|
run:
|
||||||
cargo build --release --locked --target ${{ matrix.target }}
|
cargo build --release --locked --target ${{ matrix.target }}
|
||||||
|
|
||||||
- name: build (cross)
|
- name: Build (cross)
|
||||||
if: ${{ matrix.cross == true}}
|
if: ${{ matrix.cross == true}}
|
||||||
# cross 0.2.5 broken for android
|
# cross 0.2.5 broken for android
|
||||||
run: |
|
run: |
|
||||||
cargo install cross --locked --git https://github.com/cross-rs/cross --rev 99b8069c0d977a14cd421ad8a3ef3255dc5802be
|
cargo install cross --locked --git https://github.com/cross-rs/cross --rev 99b8069c0d977a14cd421ad8a3ef3255dc5802be
|
||||||
cross build --release --no-default-features --locked --target ${{ matrix.target }}
|
cross build --release --no-default-features --locked --target ${{ matrix.target }}
|
||||||
|
|
||||||
- name: package deb
|
- name: Package deb
|
||||||
if: ${{ matrix.deb == true }}
|
if: ${{ matrix.deb == true }}
|
||||||
run: |
|
run: |
|
||||||
cargo install cargo-deb --locked
|
cargo install cargo-deb --locked
|
||||||
cargo deb -p pay-respects --no-build --no-strip --output . --target ${{ matrix.target }}
|
cargo deb -p pay-respects --no-build --no-strip --output . --target ${{ matrix.target }}
|
||||||
|
|
||||||
- name: package rpm
|
- name: Package rpm
|
||||||
if: ${{ matrix.rpm == true }}
|
if: ${{ matrix.rpm == true }}
|
||||||
run: |
|
run: |
|
||||||
cargo install cargo-generate-rpm --locked
|
cargo install cargo-generate-rpm --locked
|
||||||
cargo rpm -p pay-respects -o . --target ${{ matrix.target }}
|
cargo rpm -p pay-respects -o . --target ${{ matrix.target }}
|
||||||
|
|
||||||
- name: zipping files (unix)
|
- name: Zipping files (unix)
|
||||||
if: runner.os != 'Windows'
|
if: runner.os != 'Windows'
|
||||||
run: >
|
run: >
|
||||||
tar --zstd -cf pay-respects-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}.tar.zst
|
tar --zstd -cf pay-respects-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}.tar.zst
|
||||||
|
|
@ -106,7 +106,7 @@ jobs:
|
||||||
_pay-respects-module-100-runtime-rules
|
_pay-respects-module-100-runtime-rules
|
||||||
_pay-respects-fallback-100-request-ai
|
_pay-respects-fallback-100-request-ai
|
||||||
|
|
||||||
- name: zipping files (exe)
|
- name: Zipping files (exe)
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
run: >
|
run: >
|
||||||
7z a pay-respects-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}.zip
|
7z a pay-respects-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}.zip
|
||||||
|
|
@ -115,7 +115,7 @@ jobs:
|
||||||
./target/${{ matrix.target }}/release/_pay-respects-module-100-runtime-rules.exe
|
./target/${{ matrix.target }}/release/_pay-respects-module-100-runtime-rules.exe
|
||||||
./target/${{ matrix.target }}/release/_pay-respects-fallback-100-request-ai.exe
|
./target/${{ matrix.target }}/release/_pay-respects-fallback-100-request-ai.exe
|
||||||
|
|
||||||
- name: uploading to release
|
- name: Uploading to release
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
artifacts: |
|
artifacts: |
|
||||||
|
|
|
||||||
7
.github/workflows/rust.yml
vendored
7
.github/workflows/rust.yml
vendored
|
|
@ -15,8 +15,15 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Caching
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
key: build-and-test
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --verbose
|
run: cargo build --verbose
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: cargo test --verbose
|
run: cargo test --verbose
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue