async-cpupool/.forgejo/workflows/publish.yaml
asonix 2f3d973338
All checks were successful
/ clippy (push) Successful in 19s
/ loom (notify) (push) Successful in 27s
/ loom (queue) (push) Successful in 36s
/ check (aarch64-unknown-linux-musl) (push) Successful in 11s
/ check (x86_64-unknown-linux-musl) (push) Successful in 13s
/ check (armv7-unknown-linux-musleabihf) (push) Successful in 13s
/ tests (push) Successful in 19s
Add loom to CI
2024-04-17 13:10:06 -05:00

113 lines
2.7 KiB
YAML

on:
push:
tags:
- 'v*.*.*'
jobs:
clippy:
runs-on: base-image
container:
image: docker.io/asonix/actions-base-image:0.1
steps:
-
name: Checkout async-cpupool
uses: https://github.com/actions/checkout@v4
-
name: Cargo Cache
uses: https://git.asonix.dog/asonix/actions/cache-rust-dependencies@main
-
name: Clippy
run: |
cargo clippy --no-default-features -- -D warnings
tests:
runs-on: docker
container:
image: docker.io/asonix/actions-base-image:0.1
steps:
-
name: Checkout async-cpupool
uses: https://github.com/actions/checkout@v4
-
name: Cargo Cache
uses: https://git.asonix.dog/asonix/actions/cache-rust-dependencies@main
-
name: Test
run: cargo test
loom:
strategy:
fail-fast: false
matrix:
suite:
- queue
- notify
runs-on: docker
container:
image: docker.io/asonix/actions-base-image:0.1
steps:
-
name: Checkout async-cpupool
uses: https://github.com/actions/checkout@v4
-
name: Cargo Cache
uses: https://git.asonix.dog/asonix/actions/cache-rust-dependencies@main
-
name: Loom
run: cargo test --release --test ${{ matrix.suite }}
env:
RUSTFLAGS: '--cfg loom'
LOOM_MAX_PREEMPTIONS: '2'
build:
needs:
- clippy
- tests
runs-on: docker
container:
image: docker.io/asonix/actions-base-image:0.1
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-musl
- armv7-unknown-linux-musleabihf
- aarch64-unknown-linux-musl
steps:
-
name: Checkout async-cpupool
uses: https://github.com/actions/checkout@v4
-
name: Cargo Cache
uses: https://git.asonix.dog/asonix/actions/cache-rust-dependencies@main
-
name: Compile async-cpupool
run: cargo zigbuild --target ${{ matrix.target }}
publish-forgejo:
needs: [build]
runs-on: docker
container:
image: docker.io/asonix/actions-base-image:0.1
steps:
- uses: actions/forgejo-release@v1
with:
direction: upload
token: ${{ secrets.GITHUB_TOKEN }}
publish-crate:
needs: [build]
runs-on: docker
container:
image: docker.io/asonix/actions-base-image:0.1
steps:
-
name: Checkout async-cpupool
uses: https://github.com/actions/checkout@v4
-
name: Cargo Cache
uses: https://git.asonix.dog/asonix/actions/cache-rust-dependencies@main
-
name: Publish Crate
run: cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}