diff --git a/.github/actions/setup-builder/action.yml b/.github/actions/setup-builder/action.yml new file mode 100644 index 00000000..55d5b622 --- /dev/null +++ b/.github/actions/setup-builder/action.yml @@ -0,0 +1,16 @@ +--- +name: Setup Rust Builder +runs: + using: composite + steps: + - name: Set up rust tools + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: 1.79.0 + components: clippy + - name: Setup Dependency Cache + uses: Swatinem/rust-cache@v2 + with: + cache-directories: .build + - name: Run sccache + uses: mozilla-actions/sccache-action@v0.0.3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4046715d..3d763c61 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,8 +20,8 @@ jobs: submodules: recursive - name: Fetch tags run: git fetch --tags - - name: Run sccache - uses: mozilla-actions/sccache-action@v0.0.3 + - name: Setup Builder + uses: ./.github/actions/setup-builder - name: Build run: EXTRA_BUILD_ARTIFACTS= make build - name: Login to Quay.io diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index f5447d68..7e496013 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -27,8 +27,8 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - - name: Run sccache - uses: mozilla-actions/sccache-action@v0.0.3 + - name: Setup Builder + uses: ./.github/actions/setup-builder - name: Build skctl run: make skctl - name: Check version @@ -38,11 +38,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repo and build scripts - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - - name: Run sccache - uses: mozilla-actions/sccache-action@v0.0.3 + - name: Setup Builder + uses: ./.github/actions/setup-builder - name: Build run: make build - name: Regenerate CRDs @@ -56,11 +56,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repo and build scripts - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - - name: Run sccache - uses: mozilla-actions/sccache-action@v0.0.3 + - name: Setup Builder + uses: ./.github/actions/setup-builder - name: rustfmt nightly run: | rustup toolchain install nightly-x86_64-unknown-linux-gnu @@ -81,11 +81,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repo and build scripts - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - - name: Run sccache - uses: mozilla-actions/sccache-action@v0.0.3 + - name: Setup Builder + uses: ./.github/actions/setup-builder - name: Install grcov run: | curl -LO https://github.com/mozilla/grcov/releases/download/v0.8.18/grcov-x86_64-unknown-linux-gnu.tar.bz2 @@ -107,7 +107,7 @@ jobs: - test steps: - name: Check out repo and build scripts - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - name: Download coverage