Skip to content

Commit d439c24

Browse files
CI: Add a CI job that runs JET tests (#164)
* CI: Add a CI job that runs JET tests * JET: Always run on the latest Julia v1 Co-authored-by: James Wrigley <JamesWrigley@users.noreply.github.com> * Remove the `[compat]` bounds on JET * Remove UUID workaround * Fix UUID now that we don't use the UUID workaround * Use `julia-actions/cache` Co-authored-by: James Wrigley <JamesWrigley@users.noreply.github.com> * Run JET with multiple threads --------- Co-authored-by: James Wrigley <JamesWrigley@users.noreply.github.com>
1 parent d396a8c commit d439c24

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ concurrency:
1515
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release-') || github.run_number }}
1616
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1717

18+
permissions:
19+
contents: read
20+
1821
jobs:
1922
test:
2023
name: julia -t${{ matrix.threads}} - ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
@@ -40,6 +43,8 @@ jobs:
4043
arch: x86
4144
steps:
4245
- uses: actions/checkout@v6
46+
with:
47+
persist-credentials: false
4348
- uses: julia-actions/setup-julia@v2
4449
with:
4550
version: ${{ matrix.version }}
@@ -59,6 +64,8 @@ jobs:
5964
runs-on: ubuntu-latest
6065
steps:
6166
- uses: actions/checkout@v6
67+
with:
68+
persist-credentials: false
6269
- uses: julia-actions/setup-julia@latest
6370
with:
6471
# version: '1.6'
@@ -70,3 +77,18 @@ jobs:
7077
julia --project=docs --color=yes docs/make.jl pdf
7178
env:
7279
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
80+
81+
jet:
82+
runs-on: ubuntu-latest
83+
steps:
84+
- uses: actions/checkout@v6
85+
with:
86+
persist-credentials: false
87+
- uses: julia-actions/setup-julia@latest
88+
with:
89+
version: '1'
90+
# version: 'nightly'
91+
- uses: julia-actions/cache@v2
92+
- run: julia --color=yes --project=ci/jet -e 'import Pkg; Pkg.instantiate()'
93+
- name: Run the JET tests
94+
run: julia --color=yes -t4 --project=ci/jet ci/jet/check.jl

ci/jet/Project.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[deps]
2+
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
3+
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
4+
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
5+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
6+
7+
[sources]
8+
Distributed = {path = "../.."}

ci/jet/check.jl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using Distributed: Distributed
2+
3+
using JET: JET
4+
using Serialization: Serialization
5+
using Test: Test, @testset
6+
7+
# We don't want to fail PkgEval because of a JET failure
8+
# Therefore, we don't put the JET tests in the regular Distributed test suite
9+
# Instead, we put it in a separate CI job, which runs on the Distributed repo
10+
11+
@testset "JET" begin
12+
ignored_modules = (
13+
# We will ignore Base:
14+
Base,
15+
16+
# We'll ignore the Serialization stdlib:
17+
Serialization,
18+
)
19+
JET.test_package(Distributed; ignored_modules)
20+
end

0 commit comments

Comments
 (0)