Skip to content

Commit b0edfb0

Browse files
authored
Merge pull request #173 from JuliaLinearAlgebra/im/ci-github-actions
Migrate CI to GitHub Actions, one job per BLAS/LAPACK backend
2 parents 531f490 + 43f3ef3 commit b0edfb0

26 files changed

Lines changed: 641 additions & 496 deletions

.buildkite/instantiate_and_test.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

.buildkite/pipeline.yml

Lines changed: 0 additions & 78 deletions
This file was deleted.

.buildkite/test_linux.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.buildkite/test_macos.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.buildkite/test_windows.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.cirrus.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags: ['*']
8+
pull_request:
9+
workflow_dispatch:
10+
11+
concurrency:
12+
# Cancel in-progress runs for the same PR / branch, but never on `main`.
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
test:
21+
name: ${{ matrix.backend }} / ${{ matrix.os }} / julia ${{ matrix.julia-version }}
22+
runs-on: ${{ matrix.os }}
23+
timeout-minutes: 10
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
# Each BLAS/LAPACK backend is tested in its own job (and its own process, with
28+
# its own `test/backends/<backend>/Project.toml`) so that only a single set of
29+
# BLAS/LAPACK libraries is ever loaded at once.
30+
backend: [openblas, mkl, refblas, blis, blas64, accelerate, direct]
31+
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-latest, macos-15-intel]
32+
julia-version: ['1.10', 'nightly']
33+
exclude:
34+
# MKL is x86_64-only.
35+
- {backend: mkl, os: ubuntu-24.04-arm}
36+
- {backend: mkl, os: macos-latest}
37+
# Accelerate is a macOS-only system framework.
38+
- {backend: accelerate, os: ubuntu-latest}
39+
- {backend: accelerate, os: ubuntu-24.04-arm}
40+
- {backend: accelerate, os: windows-latest}
41+
# blas64 uses the Debian `libblas64-dev`/`liblapack64-dev` packages.
42+
- {backend: blas64, os: windows-latest}
43+
- {backend: blas64, os: macos-latest}
44+
- {backend: blas64, os: macos-15-intel}
45+
# blis_jll has no Windows build we exercise here.
46+
- {backend: blis, os: windows-latest}
47+
# Reference BLAS DLLs are not yet resolvable on Windows.
48+
- {backend: refblas, os: windows-latest}
49+
# Only the core `openblas` and `direct` backends run on nightly; every other
50+
# backend runs on the 1.10 LTS only.
51+
- {backend: mkl, julia-version: 'nightly'}
52+
- {backend: refblas, julia-version: 'nightly'}
53+
- {backend: blis, julia-version: 'nightly'}
54+
- {backend: blas64, julia-version: 'nightly'}
55+
- {backend: accelerate, julia-version: 'nightly'}
56+
steps:
57+
- uses: actions/checkout@v6
58+
59+
- uses: julia-actions/setup-julia@v3
60+
with:
61+
version: ${{ matrix.julia-version }}
62+
arch: ${{ (matrix.os == 'ubuntu-24.04-arm' || matrix.os == 'macos-latest') && 'aarch64' || 'x64' }}
63+
64+
- uses: julia-actions/cache@v3
65+
66+
# The `blas64` backend tests against a system-provided ILP64 reference BLAS/LAPACK.
67+
- name: Install system libblas64 / liblapack64 (Debian)
68+
if: matrix.backend == 'blas64'
69+
run: |
70+
sudo apt-get update
71+
sudo apt-get install -y libblas64-dev liblapack64-dev
72+
73+
# Windows needs a MinGW toolchain (gcc + make) to build the C test programs and
74+
# libblastrampoline itself.
75+
- uses: msys2/setup-msys2@v2
76+
id: msys2
77+
if: runner.os == 'Windows'
78+
with:
79+
msystem: MINGW64
80+
path-type: inherit
81+
install: >-
82+
make
83+
mingw-w64-x86_64-gcc
84+
- name: Add MSYS2 tools to PATH (Windows)
85+
if: runner.os == 'Windows'
86+
shell: pwsh
87+
run: |
88+
Add-Content -Path $env:GITHUB_PATH -Value "${{ steps.msys2.outputs.msys2-location }}\mingw64\bin"
89+
Add-Content -Path $env:GITHUB_PATH -Value "${{ steps.msys2.outputs.msys2-location }}\usr\bin"
90+
91+
- name: Instantiate ${{ matrix.backend }} project
92+
run: julia --project=test/backends/${{ matrix.backend }} -e 'import Pkg; Pkg.instantiate()'
93+
94+
- name: Run ${{ matrix.backend }} tests
95+
run: julia --project=test/backends/${{ matrix.backend }} test/runtests.jl ${{ matrix.backend }}
96+
97+
# 32-bit (i686) Linux and Windows: GitHub only offers 64-bit runners, so we install a
98+
# 32-bit Julia on the x86_64 runner (Pkg then resolves i686 JLL artifacts) and build the
99+
# C tests / libblastrampoline as 32-bit (`-m32` on Linux via gcc-multilib; a native i686
100+
# MinGW toolchain on Windows).
101+
test-32bit:
102+
name: ${{ matrix.backend }} / ${{ matrix.os }} (i686) / julia ${{ matrix.julia-version }}
103+
runs-on: ${{ matrix.os }}
104+
timeout-minutes: 10
105+
strategy:
106+
fail-fast: false
107+
matrix:
108+
backend: [openblas, refblas, direct]
109+
os: [ubuntu-latest, windows-latest]
110+
julia-version: ['1.10', 'nightly']
111+
exclude:
112+
# Reference BLAS DLLs are not yet resolvable on Windows.
113+
- {backend: refblas, os: windows-latest}
114+
# Only the core `openblas` and `direct` backends run on nightly.
115+
- {backend: refblas, julia-version: 'nightly'}
116+
steps:
117+
- uses: actions/checkout@v6
118+
119+
- uses: julia-actions/setup-julia@v3
120+
with:
121+
version: ${{ matrix.julia-version }}
122+
arch: x86
123+
124+
- uses: julia-actions/cache@v3
125+
126+
# Linux: a 64-bit gcc with multilib can target i686 via `-m32` (utils.jl's
127+
# `needs_m32()` adds it automatically when GCC is 64-bit but Julia is 32-bit).
128+
- name: Install 32-bit build support (Debian)
129+
if: runner.os == 'Linux'
130+
run: |
131+
sudo apt-get update
132+
sudo apt-get install -y gcc-multilib
133+
134+
# Windows: use a native i686 MinGW toolchain (MINGW32) so the C tests and
135+
# libblastrampoline are built as 32-bit directly.
136+
- uses: msys2/setup-msys2@v2
137+
id: msys2
138+
if: runner.os == 'Windows'
139+
with:
140+
msystem: MINGW32
141+
path-type: inherit
142+
install: >-
143+
make
144+
mingw-w64-i686-gcc
145+
- name: Add MSYS2 tools to PATH (Windows)
146+
if: runner.os == 'Windows'
147+
shell: pwsh
148+
run: |
149+
Add-Content -Path $env:GITHUB_PATH -Value "${{ steps.msys2.outputs.msys2-location }}\mingw32\bin"
150+
Add-Content -Path $env:GITHUB_PATH -Value "${{ steps.msys2.outputs.msys2-location }}\usr\bin"
151+
152+
- name: Instantiate ${{ matrix.backend }} project
153+
run: julia --project=test/backends/${{ matrix.backend }} -e 'import Pkg; Pkg.instantiate()'
154+
155+
- name: Run ${{ matrix.backend }} tests
156+
run: julia --project=test/backends/${{ matrix.backend }} test/runtests.jl ${{ matrix.backend }}
157+
158+
func-list-idempotency:
159+
name: func_list idempotency
160+
runs-on: ubuntu-latest
161+
timeout-minutes: 10
162+
steps:
163+
- uses: actions/checkout@v6
164+
- name: Regenerate func_list and check for diff
165+
run: |
166+
cd ext/gensymbol
167+
./generate_func_list.sh
168+
git diff --exit-code

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99
src/build/
1010
src/prefix/
1111
test/Manifest.toml
12+
test/backends/*/Manifest.toml
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Accelerate is a macOS system framework, so this backend has no JLL dependencies.
2+
[deps]

0 commit comments

Comments
 (0)