-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (68 loc) · 2.24 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: test
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
env:
TERM: dumb
ASAN_OPTIONS: halt_on_error=0
UBSAN_OPTIONS: print_stacktrace=1
permissions:
contents: read
jobs:
tests:
strategy:
fail-fast: false
matrix:
include:
- os: linux
runs-on: ubuntu-24.04
arch: x86_64
cc: gcc
- os: linux
runs-on: ubuntu-24.04
arch: x86_64
cc: clang
- os: macOS
runs-on: macos-14
arch: aarch64
cc: clang
name: "${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.cc }}"
runs-on: ${{ matrix.runs-on }}
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7
- name: On Linux + GCC, switch to GCC 14
if: runner.os == 'Linux' && matrix.cc == 'gcc'
run: |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100
gcc --version
- name: On Linux + Clang, fix missing LLVMgold.so and set CC env var
if: runner.os == 'Linux' && matrix.cc == 'clang'
run: |
sudo apt-get update
sudo apt-get install llvm-18-linker-tools
echo "CC=${{ matrix.cc }}" >> "${GITHUB_ENV}"
clang --version
- name: On macOS, allow Meson to find libcrypto and libssl
if: runner.os == 'macOS'
run: |
# For now, symlink rather than altering `meson.build` to pass
# `dirs : ['/opt/homebrew/lib']` to the relevant find_library()` calls.
# This keeps all the CI-related setup in one place, and trivially
# ensures that non-CI library searching is unaffected.
sudo mkdir -p /usr/local/lib
sudo ln -s /opt/homebrew/lib/{libcrypto,libssl}.dylib /usr/local/lib/
- name: Install Meson and Ninja (Linux)
if: runner.os == 'Linux'
run: sudo apt install meson ninja-build
- name: Install Meson and Ninja (macOS)
if: runner.os == 'macOS'
run: brew install meson ninja
- name: Build
run: ./dev testbuild
- name: Run
run: ./dev run