Skip to content

Commit 2ae3de0

Browse files
committed
build kettle once for project builds
1 parent c7a2026 commit 2ae3de0

1 file changed

Lines changed: 30 additions & 5 deletions

File tree

.github/workflows/test.yml

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,44 @@ jobs:
6565
shell: bash
6666
run: ./bin/test
6767

68+
build:
69+
name: Build Kettle
70+
steps:
71+
- uses: actions/checkout@v6
72+
- uses: actions-rust-lang/setup-rust-toolchain@v1
73+
- run: cargo build --release
74+
- uses: actions/upload-artifact@v8
75+
with:
76+
name: kettle
77+
path: target/release/kettle
78+
if-no-files-found: error
79+
6880
build-projects:
81+
needs: [build]
6982
name: Build ${{ matrix.project }} with Kettle
7083
runs-on: ubuntu-latest
7184
strategy:
7285
fail-fast: false
7386
matrix:
74-
project:
75-
- burntsushi/ripgrep
76-
- eza-community/eza
87+
- project: ripgrep
88+
owner: burntsushi
89+
toolchain: rust
90+
- project: eza
91+
owner: eza-community
92+
toolchain: nix
7793
steps:
78-
- uses: actions/checkout@v6
94+
- name: Check out ${{ matrix.project }}
95+
run: git clone --depth=1 "https://github.com/${{ matrix.owner }}/${{ matrix.project }}
96+
working-directory: /tmp
7997
- uses: actions-rust-lang/setup-rust-toolchain@v1
98+
if: ${{ matrix.toolchain == 'rust' }}
99+
working-directory: /tmp/${{ matrix.project }}
80100
- uses: cachix/install-nix-action@v31
101+
if: ${{ matrix.toolchain == 'nix' }}
81102
with:
82103
github_access_token: ${{ secrets.GITHUB_TOKEN }}
83-
- run: bin/kettle-build ${{ matrix.project }}
104+
working-directory: /tmp/${{ matrix.project }}
105+
- uses: actions/download-artifact@v8
106+
with:
107+
name: kettle
108+
- run: ./kettle build /tmp/${{ matrix.project }}

0 commit comments

Comments
 (0)