From e27a203213ebba57778dd2bb222fa5bcfbc6a212 Mon Sep 17 00:00:00 2001 From: Amos Wenger Date: Wed, 6 Dec 2023 18:01:24 +0100 Subject: [PATCH 1/3] Just straight up try running it on GitHub-hosted runners --- .github/workflows/release-plz.yaml | 9 +++------ .github/workflows/test.yml | 12 ++---------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release-plz.yaml b/.github/workflows/release-plz.yaml index 85bd88f..311bc62 100644 --- a/.github/workflows/release-plz.yaml +++ b/.github/workflows/release-plz.yaml @@ -1,4 +1,4 @@ -name: Release-plz +name: release-plz permissions: pull-requests: write @@ -6,8 +6,7 @@ permissions: on: push: - branches: - - main + branches: ["main"] jobs: release-plz: @@ -18,10 +17,8 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable - name: Run release-plz uses: MarcoIeni/release-plz-action@v0.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} \ No newline at end of file + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b25703e..fd759d4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,25 +2,17 @@ name: test on: push: - branches: - - main + branches: ["main"] pull_request: merge_group: jobs: test: - env: - RUSTC_WRAPPER: sccache - CARGO_INCREMENTAL: 0 - CARGO_HOME: /vol/cargo - runs-on: self-hosted steps: - name: Check out repository code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run tests run: | cd ${{ github.workspace }} - sccache --zero-stats cargo clippy just ci-test - sccache --show-stats From e74adc2aec3d8e9ecd3defdb99a58cd8ef5c0ff8 Mon Sep 17 00:00:00 2001 From: Amos Wenger Date: Wed, 6 Dec 2023 18:02:10 +0100 Subject: [PATCH 2/3] Use the sccache action --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fd759d4..ddbd165 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,9 +8,14 @@ on: jobs: test: + env: + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" steps: - name: Check out repository code uses: actions/checkout@v4 + - name: Set up sccache + uses: mozilla-actions/sccache-action@v0.0.3 - name: Run tests run: | cd ${{ github.workspace }} From 24b139f6eb3618e560198a24758c4c40a4e615de Mon Sep 17 00:00:00 2001 From: Amos Wenger Date: Wed, 6 Dec 2023 21:31:41 +0100 Subject: [PATCH 3/3] Install missing tools --- .github/workflows/release-plz.yaml | 2 +- .github/workflows/test.yml | 22 ++++++++++++++++++---- Justfile | 1 - 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-plz.yaml b/.github/workflows/release-plz.yaml index 311bc62..a0378b6 100644 --- a/.github/workflows/release-plz.yaml +++ b/.github/workflows/release-plz.yaml @@ -10,7 +10,7 @@ on: jobs: release-plz: - name: Release-plz + name: release-plz runs-on: ubuntu-latest steps: - name: Checkout repository diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ddbd165..d4bcb5c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,16 +8,30 @@ on: jobs: test: + name: test + runs-on: ubuntu-latest env: - SCCACHE_GHA_ENABLED: "true" - RUSTC_WRAPPER: "sccache" + RUSTC_WRAPPER: sccache + SCCACHE_GHA_ENABLED: true steps: - name: Check out repository code uses: actions/checkout@v4 - - name: Set up sccache - uses: mozilla-actions/sccache-action@v0.0.3 + - name: Set up sccache (part 1) + uses: mozilla-actions/sccache-action@v0.0.3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Set up sccache (part 2) + run: sccache --start-server + - uses: taiki-e/install-action@v2 + with: + tool: just,cargo-llvm-cov,cargo-nextest - name: Run tests run: | cd ${{ github.workspace }} cargo clippy just ci-test + - name: Upload coverage information + run: | + curl -Os https://uploader.codecov.io/latest/linux/codecov + chmod +x codecov + ./codecov -t ${CODECOV_TOKEN} \ No newline at end of file diff --git a/Justfile b/Justfile index 2d7255e..22cf061 100644 --- a/Justfile +++ b/Justfile @@ -7,7 +7,6 @@ _default: ci-test: #!/bin/bash -eux cargo llvm-cov nextest --lcov --output-path coverage.lcov - codecov # Show coverage locally cov: