Skip to content

Commit 4dccceb

Browse files
committed
Move pony-compiler tests to dedicated CI workflow
The pony-compiler tests only need to run when the compiler library or the pony_compiler tool itself changes, not on every PR that touches tools. Also increases the parallel compilation test timeout from 9s to 60s.
1 parent 9e6448f commit 4dccceb

File tree

3 files changed

+103
-7
lines changed

3 files changed

+103
-7
lines changed
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: pony-compiler
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
paths:
7+
- 'src/libponyc/**'
8+
- 'tools/lib/ponylang/pony_compiler/**'
9+
- '.github/workflows/pr-pony-compiler.yml'
10+
11+
concurrency:
12+
group: pr-pony-compiler-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
permissions:
16+
packages: read
17+
18+
jobs:
19+
linux:
20+
if: github.event.pull_request.draft == false
21+
runs-on: ubuntu-latest
22+
name: Linux
23+
container:
24+
image: ghcr.io/ponylang/ponyc-ci-alpine3.23-builder:20260201
25+
options: --user pony
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v6.0.2
29+
- name: Restore Libs Cache
30+
id: restore-libs
31+
uses: actions/cache/restore@v5.0.3
32+
with:
33+
path: |
34+
build/libs
35+
lib/llvm/src/compiler-rt/lib/builtins
36+
key: libs-ghcr.io/ponylang/ponyc-ci-alpine3.23-builder:20260201-${{ hashFiles('Makefile', 'CMakeLists.txt', 'lib/CMakeLists.txt', 'lib/llvm/patches/*') }}
37+
- name: Build Libs
38+
if: steps.restore-libs.outputs.cache-hit != 'true'
39+
run: make libs build_flags=-j8
40+
- name: Build
41+
run: |
42+
make configure config=debug
43+
make build config=debug
44+
- name: Test pony-compiler
45+
run: make test-pony-compiler config=debug
46+
47+
macos:
48+
if: github.event.pull_request.draft == false
49+
runs-on: macos-26
50+
51+
name: macOS
52+
steps:
53+
- name: Checkout
54+
uses: actions/checkout@v6.0.2
55+
- name: Restore Libs Cache
56+
id: restore-libs
57+
uses: actions/cache/restore@v5.0.3
58+
with:
59+
path: |
60+
build/libs
61+
lib/llvm/src/compiler-rt/lib/builtins
62+
key: libs-arm64-macos-26-${{ hashFiles('Makefile', 'CMakeLists.txt', 'lib/CMakeLists.txt', 'lib/llvm/patches/*') }}
63+
- name: Build Libs
64+
if: steps.restore-libs.outputs.cache-hit != 'true'
65+
run: make libs build_flags=-j8
66+
- name: Build
67+
run: |
68+
make configure arch=armv8 config=debug
69+
make build config=debug
70+
- name: Test pony-compiler
71+
run: make test-pony-compiler config=debug
72+
73+
windows:
74+
if: github.event.pull_request.draft == false
75+
runs-on: windows-2025
76+
defaults:
77+
run:
78+
shell: pwsh
79+
80+
name: Windows
81+
steps:
82+
- name: Disable Windows Defender
83+
run: Set-MpPreference -DisableRealtimeMonitoring $true
84+
- name: Checkout
85+
uses: actions/checkout@v6.0.2
86+
- name: Restore Libs Cache
87+
id: restore-libs
88+
uses: actions/cache/restore@v5.0.3
89+
with:
90+
path: |
91+
build/libs
92+
lib/llvm/src/compiler-rt/lib/builtins
93+
key: libs-windows-2025-${{ hashFiles('make.ps1', 'CMakeLists.txt', 'lib/CMakeLists.txt', 'lib/llvm/patches/*') }}
94+
- name: Build Libs
95+
if: steps.restore-libs.outputs.cache-hit != 'true'
96+
run: .\make.ps1 -Command libs
97+
- name: Build
98+
run: |
99+
.\make.ps1 -Command configure -Config Debug
100+
.\make.ps1 -Command build -Config Debug
101+
- name: Test pony-compiler
102+
run: .\make.ps1 -Command test -Config Debug -TestsToRun pony-compiler-tests

.github/workflows/pr-tools.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ jobs:
4444
run: |
4545
make configure config=debug
4646
make build config=debug
47-
- name: Test pony-compiler
48-
run: make test-pony-compiler config=debug
4947
- name: Test pony-doc
5048
run: make test-pony-doc config=debug
5149
- name: Test pony-lint
@@ -78,8 +76,6 @@ jobs:
7876
run: |
7977
make configure arch=armv8 config=debug
8078
make build config=debug
81-
- name: Test pony-compiler
82-
run: make test-pony-compiler config=debug
8379
- name: Test pony-doc
8480
run: make test-pony-doc config=debug
8581
- name: Test pony-lint
@@ -115,8 +111,6 @@ jobs:
115111
run: |
116112
.\make.ps1 -Command configure -Config Debug
117113
.\make.ps1 -Command build -Config Debug
118-
- name: Test pony-compiler
119-
run: .\make.ps1 -Command test -Config Debug -TestsToRun pony-compiler-tests
120114
- name: Test pony-doc
121115
run: .\make.ps1 -Command test -Config Debug -TestsToRun pony-doc-tests
122116
- name: Test pony-lint

tools/lib/ponylang/pony_compiler/tests/main.pony

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ actor ParallelCompiler
496496
class \nodoc\ _ParallelCompilerTest is UnitTest
497497
fun name(): String => "parallel/compilation"
498498
fun apply(h: TestHelper) =>
499-
h.long_test(9000000000)
499+
h.long_test(60_000_000_000)
500500
let source_dir = FilePath(FileAuth(h.env.root), Path.join(Path.dir(__loc.file()), "constructs"))
501501
for i in Range(0, 10) do
502502
let token: String val = i.string()

0 commit comments

Comments
 (0)