Skip to content

Commit a8d2ccb

Browse files
authored
CI: Add macOS LLVM smoke tests (#1256)
There is a small caveat: I only enabled these for the PR CI, not for the `master` branch CI. If interested in the latter, feel free to request that too. --- To be used in #1219. - run all IO tests on macOS with LLVM - run with `--debug` flag - takes some 3m30s (like JS tests) Here's the log: <img width="645" height="274" alt="Screenshot 2025-12-13 at 17 50 31" src="https://github.com/user-attachments/assets/df402a2c-bbb3-400f-94d4-da9ec511418d" />
1 parent 25a07b9 commit a8d2ccb

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

.github/actions/setup-effekt/action.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ inputs:
1515
required: false
1616
default: '18'
1717
install-dependencies:
18-
description: 'Whether to install system dependencies (Linux only)'
18+
description: 'Whether to install system dependencies (Linux & macOS only)'
1919
required: false
2020
default: 'false'
2121
install-valgrind:
@@ -41,6 +41,7 @@ runs:
4141
with:
4242
node-version: ${{ inputs.node-version }}
4343

44+
4445
# Only run the following on Linux-based runners
4546
- name: Update apt database
4647
if: ${{ inputs.install-dependencies == 'true' && runner.os == 'Linux' }}
@@ -66,3 +67,17 @@ runs:
6667
if: ${{ inputs.install-dependencies == 'true' && runner.os == 'Linux' }}
6768
run: sudo apt-get install -y libuv1-dev
6869
shell: bash
70+
71+
72+
# Only run the following on macOS-based runners
73+
- name: Install LLVM ${{ inputs.llvm-version }} (macOS)
74+
if: ${{ inputs.install-dependencies == 'true' && runner.os == 'macOS' }}
75+
run: |
76+
brew install llvm@${{ inputs.llvm-version }}
77+
echo "$(brew --prefix llvm@${{ inputs.llvm-version }})/bin" >> $GITHUB_PATH
78+
shell: bash
79+
80+
- name: Install libuv (macOS)
81+
if: ${{ inputs.install-dependencies == 'true' && runner.os == 'macOS' }}
82+
run: brew install libuv
83+
shell: bash

.github/workflows/ci-pr.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,25 @@ jobs:
9696
- name: Run Windows smoke test
9797
run: sbt "effektJVM/testOnly effekt.JavaScriptTests -- --tests=.*examples[\\/]*pos[\\/]*sideeffects.*"
9898

99+
macos-llvm-tests:
100+
name: "macOS LLVM Smoke Tests"
101+
needs: build-and-compile
102+
runs-on: macos-latest
103+
steps:
104+
- uses: actions/checkout@v6
105+
with:
106+
submodules: 'true'
107+
108+
- uses: ./.github/actions/setup-effekt
109+
with:
110+
install-dependencies: 'true'
111+
112+
- name: Compile project
113+
run: sbt Test/compile
114+
115+
- name: Run macOS LLVM smoke tests (with debug)
116+
run: EFFEKT_DEBUG=1 sbt "effektJVM/testOnly effekt.LLVMTests -- --tests=.*benchmarks[\\/]*input_output[\\/].*"
117+
99118
js-tests:
100119
name: "JS Backend"
101120
needs: build-and-compile
@@ -146,5 +165,5 @@ jobs:
146165

147166
- uses: ./.github/actions/restore-build-cache
148167

149-
- name: Run LLVM backend tests
168+
- name: Run LLVM backend tests (with debug & valgrind)
150169
run: EFFEKT_VALGRIND=1 EFFEKT_DEBUG=1 sbt effektJVM/testBackendLLVM

0 commit comments

Comments
 (0)