From 0cdb7ddb6ef60dd9eb22d55b266e9114c66e68ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Wed, 11 Dec 2024 11:17:37 +0100 Subject: [PATCH 1/4] ci: remove cache from short jobs --- .github/workflows/ci.yml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 595952e855..f9f52f8750 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,9 +24,6 @@ jobs: - uses: actions/checkout@v4 - uses: taiki-e/install-action@cargo-hack - uses: mkroening/rust-toolchain-toml@main - - uses: Swatinem/rust-cache@v2 - with: - save-if: ${{ github.ref == 'refs/heads/main' }} - run: rustup target add x86_64-unknown-none - name: Check each feature run: cargo hack check --package hermit-kernel --each-feature --skip gem-net --no-dev-deps --target x86_64-unknown-none @@ -40,12 +37,6 @@ jobs: - uses: actions/checkout@v4 - uses: mkroening/rust-toolchain-toml@main - run: rustup component add clippy - - uses: Swatinem/rust-cache@v2 - with: - save-if: ${{ github.ref == 'refs/heads/main' }} - workspaces: | - . - hermit-builtins - run: cargo xtask clippy format: @@ -70,9 +61,6 @@ jobs: steps: - uses: actions/checkout@v4 - uses: mkroening/rust-toolchain-toml@main - - uses: Swatinem/rust-cache@v2 - with: - save-if: ${{ github.ref == 'refs/heads/main' }} - run: cargo xtask doc build: @@ -81,12 +69,6 @@ jobs: steps: - uses: actions/checkout@v4 - uses: mkroening/rust-toolchain-toml@main - - uses: Swatinem/rust-cache@v2 - with: - save-if: ${{ github.ref == 'refs/heads/main' }} - workspaces: | - . - hermit-builtins - name: Build minimal kernel run: | cargo xtask build --arch x86_64 --no-default-features @@ -102,12 +84,6 @@ jobs: sudo apt-get update sudo apt-get install qemu-system-x86 - uses: mkroening/rust-toolchain-toml@main - - uses: Swatinem/rust-cache@v2 - with: - save-if: ${{ github.ref == 'refs/heads/main' }} - workspaces: | - . - hermit-builtins - name: Unit tests run: cargo test --lib env: From 9569759d2d72084bc8e00b3978a4cf0c4f1836a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Wed, 11 Dec 2024 11:20:27 +0100 Subject: [PATCH 2/4] ci: create cache from scratch --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9f52f8750..0fd0ac1691 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -154,6 +154,7 @@ jobs: with: key: ${{ matrix.arch }}-${{ matrix.profile }} save-if: ${{ github.ref == 'refs/heads/main' }} + lookup-only: ${{ github.ref == 'refs/heads/main' }} workspaces: | . kernel From 13517b70ab22ae007425b73b9a7a141d467b4958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Wed, 11 Dec 2024 11:22:58 +0100 Subject: [PATCH 3/4] ci: don't run non-caching jobs on main --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0fd0ac1691..2f8ef066b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,7 @@ defaults: jobs: check: name: Check + if: github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -32,6 +33,7 @@ jobs: clippy: name: Clippy + if: github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -41,6 +43,7 @@ jobs: format: name: Format + if: github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -50,6 +53,7 @@ jobs: typos: name: Typos + if: github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -57,6 +61,7 @@ jobs: doc: name: Doc + if: github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -65,6 +70,7 @@ jobs: build: name: Build + if: github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -76,6 +82,7 @@ jobs: test: name: Test + if: github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From 7100469be5332357a2d6afd4a444c33f26f1524e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Wed, 11 Dec 2024 12:19:50 +0100 Subject: [PATCH 4/4] ci: remove caching --- .github/workflows/ci.yml | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f8ef066b5..60dec20df1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,6 @@ name: CI on: - push: - branches: - - main pull_request: merge_group: @@ -19,7 +16,6 @@ defaults: jobs: check: name: Check - if: github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -33,7 +29,6 @@ jobs: clippy: name: Clippy - if: github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -43,7 +38,6 @@ jobs: format: name: Format - if: github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -53,7 +47,6 @@ jobs: typos: name: Typos - if: github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -61,7 +54,6 @@ jobs: doc: name: Doc - if: github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -70,7 +62,6 @@ jobs: build: name: Build - if: github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -82,7 +73,6 @@ jobs: test: name: Test - if: github.ref != 'refs/heads/main' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -157,15 +147,6 @@ jobs: - uses: mkroening/rust-toolchain-toml@main with: toolchain-file: 'kernel/rust-toolchain.toml' - - uses: Swatinem/rust-cache@v2 - with: - key: ${{ matrix.arch }}-${{ matrix.profile }} - save-if: ${{ github.ref == 'refs/heads/main' }} - lookup-only: ${{ github.ref == 'refs/heads/main' }} - workspaces: | - . - kernel - kernel/hermit-builtins - name: Download loader run: gh release download --repo hermit-os/loader --pattern 'hermit-loader-${{ matrix.arch }}*' - name: Dowload OpenSBI