Skip to content

Commit af294f2

Browse files
authored
Merge pull request #60 from pbaekgaard/pbaekgaard-patch-1
Update ci.yml
2 parents be76a17 + 34b7dae commit af294f2

1 file changed

Lines changed: 19 additions & 35 deletions

File tree

.github/workflows/ci.yml

Lines changed: 19 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,56 +8,40 @@ env:
88
CARGO_TERM_COLOR: always
99

1010
jobs:
11-
test:
11+
# This job handles all testing
12+
test-all:
1213
runs-on: ubuntu-latest
1314
steps:
1415
- uses: actions/checkout@v4
15-
16-
- name: Install Rust
17-
uses: dtolnay/rust-toolchain@stable
18-
19-
- name: Cache cargo dependencies
20-
uses: actions/cache@v4
21-
with:
22-
path: |
23-
~/.cargo/bin/
24-
~/.cargo/registry/index/
25-
~/.cargo/registry/cache/
26-
~/.cargo/git/db/
27-
target/
28-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
16+
- uses: dtolnay/rust-toolchain@stable
17+
# ... (insert your cache step here) ...
2918

3019
- name: Compiler Tests
3120
working-directory: ./compiler
32-
run: cargo test --verbose
33-
21+
run: cargo test
3422
- name: Interpreter Tests
3523
working-directory: ./interpreter
36-
run: cargo test --verbose
24+
run: cargo test
3725

38-
build:
26+
# Now we split the builds into separate jobs
27+
build-compiler:
3928
runs-on: ubuntu-latest
4029
steps:
4130
- uses: actions/checkout@v4
42-
43-
- name: Install Rust
44-
uses: dtolnay/rust-toolchain@stable
45-
46-
- name: Cache cargo dependencies
47-
uses: actions/cache@v4
48-
with:
49-
path: |
50-
~/.cargo/bin/
51-
~/.cargo/registry/index/
52-
~/.cargo/registry/cache/
53-
~/.cargo/git/db/
54-
target/
55-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
31+
- uses: dtolnay/rust-toolchain@stable
32+
# ... (insert your cache step here) ...
5633

5734
- name: Build Compiler
5835
working-directory: ./compiler
59-
run: cargo build --release --verbose
36+
run: cargo build --release
37+
38+
build-interpreter:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: dtolnay/rust-toolchain@stable
43+
# ... (insert your cache step here) ...
6044

6145
- name: Build Interpreter
6246
working-directory: ./interpreter
63-
run: cargo build --release --verbose
47+
run: cargo build --release

0 commit comments

Comments
 (0)