-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #259 from wcampbell0x2a/test-more-archs
ci: Test more archs
- Loading branch information
Showing
27 changed files
with
420 additions
and
338 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,40 +5,44 @@ on: | |
pull_request: | ||
branches: [ master ] | ||
|
||
env: | ||
BINS: "add unsquashfs replace" | ||
|
||
name: binaries | ||
|
||
jobs: | ||
# release binaries | ||
release-bins: | ||
runs-on: ubuntu-latest | ||
env: | ||
RUSTFLAGS: "-C target-feature=+crt-static" | ||
strategy: | ||
matrix: | ||
targets: | ||
- x86_64-unknown-linux-musl | ||
bins: | ||
- unsquashfs | ||
- add | ||
- replace | ||
- aarch64-unknown-linux-musl | ||
- arm-unknown-linux-musleabi | ||
- mips-unknown-linux-musl | ||
- mipsel-unknown-linux-musl | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
target: ${{ matrix.targets }} | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: cargo install cargo-quickinstall | ||
- run: cargo quickinstall [email protected] --force | ||
- run: cross build --bin ${{ matrix.bins }} --locked --release --target ${{ matrix.targets }} | ||
- run: cross build --bins --locked --release --target ${{ matrix.targets }} | ||
|
||
- name: archive | ||
run: | | ||
tar -czvf ${{ matrix.bins }}-${{ matrix.targets }}.tar.gz \ | ||
-C target/${{ matrix.targets }}/release/ ${{ matrix.bins }} | ||
tar -czvf backhand-${{ matrix.targets }}.tar.gz \ | ||
-C target/${{ matrix.targets }}/release/ $BINS | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ matrix.bins }}-${{ matrix.targets }}.tar.gz | ||
path: ${{ matrix.bins }}-${{ matrix.targets }}.tar.gz | ||
name: backhand-${{ matrix.targets }}.tar.gz | ||
path: backhand-${{ matrix.targets }}.tar.gz | ||
|
||
# check semvar before release! | ||
- name: Check semver | ||
|
@@ -50,7 +54,7 @@ jobs: | |
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: ${{ matrix.bins }}-${{ matrix.targets }}.tar.gz | ||
asset_name: ${{ matrix.bins }}-${{ matrix.targets }}.tar.gz | ||
file: backhand-${{ matrix.targets }}.tar.gz | ||
asset_name: backhand-${{ matrix.targets }}.tar.gz | ||
tag: ${{ github.ref }} | ||
overwrite: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,42 @@ on: | |
name: ci | ||
|
||
jobs: | ||
# build, test all supported targets | ||
# build/test all supported targets for library and bins (skipping slow and squashfs-tools tests) | ||
build-test: | ||
runs-on: ubuntu-latest | ||
env: | ||
RUSTFLAGS: "-C target-feature=+crt-static" | ||
strategy: | ||
matrix: | ||
target: | ||
- x86_64-unknown-linux-musl | ||
- aarch64-unknown-linux-musl | ||
- arm-unknown-linux-musleabi | ||
- armv7-unknown-linux-musleabi | ||
toolchain: | ||
- stable | ||
# msrv | ||
- 1.65.0 | ||
features: | ||
# default features | ||
- | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
- uses: Swatinem/rust-cache@v2 | ||
# install cross | ||
- run: cargo install cargo-quickinstall | ||
- run: cargo quickinstall [email protected] --force | ||
# build with cross | ||
- run: cross build ${{ matrix.features }} --target ${{ matrix.target }} --locked --lib | ||
# test with cross | ||
- run: CROSS_CONTAINER_OPTS="--network host" RUST_LOG=info cross test --release ${{ matrix.features }} --target ${{ matrix.target }} --locked -- --skip slow | ||
|
||
# build/test all supported on native(musl) arch for library and bins (all tests) | ||
build-test-native: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
|
@@ -33,10 +67,9 @@ jobs: | |
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
components: rustfmt, clippy | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: cargo build ${{ matrix.features }} | ||
- run: RUST_LOG=info cargo test --release ${{ matrix.features }} | ||
- run: RUST_LOG=info cargo test --release ${{ matrix.features }} --locked --features __test_unsquashfs | ||
|
||
|
||
# benchmark | ||
benchmark: | ||
|
@@ -54,15 +87,15 @@ jobs: | |
- uses: Swatinem/rust-cache@v2 | ||
- run: cargo bench | ||
|
||
# fmt and clippy on nightly builds | ||
fmt-clippy-nightly: | ||
# fmt and clippy on stable | ||
fmt-clippy-stable: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: nightly | ||
toolchain: stable | ||
components: rustfmt, clippy | ||
- uses: Swatinem/rust-cache@v2 | ||
|
||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.