-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
107 additions
and
28 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: TestFreeBSD | ||
|
||
on: | ||
[push, pull_request] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
toolchain: ["stable"] # ["nightly", "beta", "stable"] # | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Test in FreeBSD | ||
id: test | ||
uses: vmactions/freebsd-vm@v1 | ||
with: | ||
usesh: true | ||
sync: rsync | ||
copyback: false | ||
prepare: | | ||
pkg install -y curl pkgconf glib | ||
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf > install.sh | ||
chmod +x install.sh | ||
./install.sh -y --default-toolchain ${{ matrix.toolchain }} | ||
run: | | ||
. "$HOME/.cargo/env" | ||
set -ex | ||
# Add feature "nightly" if toolchain is nightly | ||
if [ "${{ matrix.toolchain }}" = "nightly" ]; then | ||
ARGS="$ARGS --features nightly" | ||
fi | ||
RUST_BACKTRACE=1 cargo +${{ matrix.toolchain }} fmt --all -- --check | ||
RUST_BACKTRACE=1 cargo +${{ matrix.toolchain }} clippy --all-features -- -D warnings | ||
RUST_BACKTRACE=1 cargo +${{ matrix.toolchain }} build --all-features |
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 |
---|---|---|
|
@@ -80,7 +80,38 @@ jobs: | |
cargo lipo --verbose --all-features --features="async tokio/rt-multi-thread" | ||
- name: Abort on error | ||
if: ${{ failure() }} | ||
run: echo "iOs build job failed" && false | ||
run: echo "iOS build job failed" && false | ||
|
||
build_n_test_openharmony: | ||
strategy: | ||
matrix: | ||
target: [aarch64-unknown-linux-ohos, armv7-unknown-linux-ohos, x86_64-unknown-linux-ohos] | ||
fail-fast: false | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: openharmony-rs/[email protected] | ||
id: setup-ohos | ||
with: | ||
version: "5.0" | ||
- name: Install ohrs and rust compiler for ohos target | ||
if: ${{ !cancelled() }} | ||
run: | | ||
cargo install --locked ohrs | ||
rustup target add ${{ matrix.target }} | ||
- name: fmt & clippy | ||
if: ${{ !cancelled() }} | ||
run: | | ||
cargo fmt --all -- --check | ||
ohrs cargo --disable-target -- clippy --target ${{matrix.target}} --all-features --features="async tokio/rt-multi-thread" -- -D warnings | ||
- name: Build | ||
if: ${{ !cancelled() }} | ||
run: | | ||
ohrs cargo --disable-target -- rustc --target ${{matrix.target}} --verbose --all-features --features="async tokio/rt-multi-thread" --lib --crate-type=cdylib | ||
- name: Abort on error | ||
if: ${{ failure() }} | ||
run: echo "OpenHarmony build job failed" && false | ||
|
||
semver: | ||
name: Check semver | ||
|
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
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
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
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