Skip to content

Commit

Permalink
Upload artifacts
Browse files Browse the repository at this point in the history
Signed-off-by: Lucas Steuernagel <[email protected]>
  • Loading branch information
LucasSte committed Sep 28, 2023
1 parent f01a294 commit 5cd8441
Showing 1 changed file with 52 additions and 33 deletions.
85 changes: 52 additions & 33 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 5cd8441

Please sign in to comment.