Skip to content

Commit 8419ecf

Browse files
committed
CI: Add a CI job that runs JET tests
1 parent d396a8c commit 8419ecf

File tree

3 files changed

+55
-0
lines changed

3 files changed

+55
-0
lines changed

.github/workflows/ci.yml

Lines changed: 24 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,20 @@ 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.12'
90+
# version: 'nightly'
91+
- name: Edit Distributed UUID
92+
run: |
93+
julia --color=yes -e 'write("Project.toml", replace(read("Project.toml", String), r"uuid = .*?\n" =>"uuid = \"47e2e46d-f89d-539d-b4ee-838fcccc9c8e\"\n"));'
94+
- run: julia --color=yes --project=ci/jet -e 'import Pkg; Pkg.instantiate()'
95+
- name: Run the JET tests
96+
run: julia --color=yes --project=ci/jet ci/jet/check.jl

ci/jet/Project.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[deps]
2+
Distributed = "47e2e46d-f89d-539d-b4ee-838fcccc9c8e"
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 = "../.."}
9+
10+
[compat]
11+
JET = "0.11"

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)