-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Fix and cover tests for target x86_64-unknown-linux-musl (#140)
* Fix tests and examples under musl Signed-off-by: Xuanwo <[email protected]> * Cover build and test under musl Signed-off-by: Xuanwo <[email protected]> * Fix target not installed Signed-off-by: Xuanwo <[email protected]> * Install musl-tools Signed-off-by: Xuanwo <[email protected]> * Don't run test for aarch Signed-off-by: Xuanwo <[email protected]> * Cancel previous jobs Signed-off-by: Xuanwo <[email protected]>
- Loading branch information
Showing
4 changed files
with
56 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,10 @@ on: [push, pull_request] | |
|
||
name: build | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
name: Format and Clippy | ||
|
@@ -43,16 +47,24 @@ jobs: | |
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
toolchain: [stable, nightly, 1.56.1] | ||
target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu, x86_64-apple-darwin, aarch64-apple-darwin] | ||
target: [ | ||
x86_64-unknown-linux-gnu, | ||
aarch64-unknown-linux-gnu, | ||
x86_64-unknown-linux-musl, | ||
x86_64-apple-darwin, | ||
aarch64-apple-darwin, | ||
] | ||
exclude: | ||
- os: ubuntu-latest | ||
target: x86_64-apple-darwin | ||
- os: ubuntu-latest | ||
target: aarch64-apple-darwin | ||
- os: macos-latest | ||
target: x86_64-unknown-linux-gnu | ||
- os: macos-latest | ||
target: aarch64-unknown-linux-gnu | ||
- os: ubuntu-latest | ||
target: x86_64-apple-darwin | ||
- os: ubuntu-latest | ||
target: aarch64-apple-darwin | ||
- os: macos-latest | ||
target: x86_64-unknown-linux-gnu | ||
- os: macos-latest | ||
target: aarch64-unknown-linux-gnu | ||
- os: macos-latest | ||
target: x86_64-unknown-linux-musl | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
|
@@ -92,6 +104,18 @@ jobs: | |
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
toolchain: [stable, nightly] | ||
target: [ | ||
x86_64-unknown-linux-gnu, | ||
x86_64-unknown-linux-musl, | ||
x86_64-apple-darwin, | ||
] | ||
exclude: | ||
- os: ubuntu-latest | ||
target: x86_64-apple-darwin | ||
- os: macos-latest | ||
target: x86_64-unknown-linux-gnu | ||
- os: macos-latest | ||
target: x86_64-unknown-linux-musl | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
|
@@ -103,16 +127,21 @@ jobs: | |
with: | ||
profile: minimal | ||
toolchain: ${{ matrix.toolchain }} | ||
target: ${{ matrix.target }} | ||
override: true | ||
|
||
- if: ${{ matrix.target == 'x86_64-unknown-linux-musl' }} | ||
name: Install musl | ||
run: sudo apt install musl-tools | ||
|
||
- name: Run cargo test prost | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: test | ||
args: --features flamegraph,prost-codec | ||
args: --features flamegraph,prost-codec --target ${{ matrix.target }} | ||
|
||
- name: Run cargo test protobuf | ||
uses: actions-rs/[email protected] | ||
with: | ||
command: test | ||
args: --features flamegraph,protobuf-codec | ||
args: --features flamegraph,protobuf-codec --target ${{ matrix.target }} |
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
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