-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Lucas Steuernagel <[email protected]>
- Loading branch information
Showing
1 changed file
with
52 additions
and
33 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 |
---|---|---|
|
@@ -52,8 +52,15 @@ jobs: | |
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Rust stable | ||
run: rustup default 1.70.0 | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: | | ||
llvm-tools | ||
clippy | ||
rustfmt | ||
- name: cargo install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
- name: Run cargo clippy | ||
run: cargo clippy --workspace --tests --bins -- -D warnings | ||
- name: Run cargo clippy without wasm_opt feature | ||
|
@@ -64,16 +71,28 @@ jobs: | |
run: cargo doc --workspace --bins | ||
- name: Run cargo fmt | ||
run: cargo fmt --all -- --check | ||
- name: Build | ||
if: always() | ||
run: cargo build --verbose | ||
- name: Run tests | ||
if: always() | ||
run: cargo test --verbose --workspace | ||
- uses: actions/[email protected] | ||
- name: Configure llvm-cov and build | ||
run: | | ||
cargo llvm-cov show-env --export-prefix > env.sh | ||
source env.sh | ||
cargo llvm-cov build | ||
echo $LLVM_PROFILE_FILE | ||
- name: Upload binary | ||
uses: actions/[email protected] | ||
with: | ||
name: solang-linux-x86-64 | ||
path: ./target/debug/solang | ||
- name: Run tests | ||
if: always() | ||
run: cargo llvm-cov --all-features --workspace --no-report | ||
- name: Compress test coverage files | ||
run: tar -czvf rust-tests.tar.gz *.profraw | ||
working-directory: ./target | ||
- name: Upload test coverage files | ||
uses: actions/[email protected] | ||
with: | ||
name: rust-test | ||
path: ./target/rust-test.tar.gz | ||
|
||
linux-arm: | ||
name: Linux Arm | ||
|
@@ -418,27 +437,27 @@ jobs: | |
./test | ||
working-directory: ./stdlib | ||
|
||
coverage: | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/hyperledger/solang-llvm:ci-5 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: llvm-tools | ||
- name: cargo install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
- name: cargo llvm-cov | ||
run: cargo llvm-cov --all-features --lcov --output-path lcov.info | ||
env: | ||
CARGO_HUSKY_DONT_INSTALL_HOOKS: true | ||
- name: Upload coverage report to codecov.io | ||
uses: codecov/codecov-action@v3 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
with: | ||
fail_ci_if_error: true | ||
# coverage: | ||
# runs-on: ubuntu-latest | ||
# container: ghcr.io/hyperledger/solang-llvm:ci-5 | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# submodules: recursive | ||
# - name: Install Rust | ||
# uses: dtolnay/rust-toolchain@stable | ||
# with: | ||
# components: llvm-tools | ||
# - name: cargo install cargo-llvm-cov | ||
# uses: taiki-e/install-action@cargo-llvm-cov | ||
# - name: cargo llvm-cov | ||
# run: cargo llvm-cov --all-features --lcov --output-path lcov.info | ||
# env: | ||
# CARGO_HUSKY_DONT_INSTALL_HOOKS: true | ||
# - name: Upload coverage report to codecov.io | ||
# uses: codecov/codecov-action@v3 | ||
# env: | ||
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
# with: | ||
# fail_ci_if_error: true |