|
1 | 1 | name: CI
|
2 | 2 | on:
|
3 | 3 | push:
|
4 |
| - branches: [master] |
| 4 | + branches: ["*"] |
5 | 5 | tags: ["*"]
|
6 | 6 | pull_request:
|
7 | 7 | workflow_dispatch:
|
| 8 | + |
8 | 9 | jobs:
|
9 |
| - test: |
10 |
| - name: ${{ matrix.os }} - ${{ matrix.compiler }} - ${{ github.event_name }} |
11 |
| - runs-on: ${{ matrix.os }} |
| 10 | + linux: |
| 11 | + name: Linux ${{ matrix.arch }} / ${{ matrix.cc }} |
| 12 | + runs-on: ${{ matrix.runner }} |
12 | 13 | strategy:
|
13 | 14 | fail-fast: false
|
14 | 15 | matrix:
|
15 |
| - os: |
16 |
| - - ubuntu-latest |
17 |
| - - macos-latest |
18 |
| - compiler: |
19 |
| - - gcc |
20 |
| - - clang |
21 |
| - exclude: |
22 |
| - - os: macos-latest |
23 |
| - compiler: gcc |
| 16 | + arch: [x86_64, arm64] |
| 17 | + cc: [gcc, clang] |
| 18 | + include: |
| 19 | + - arch: x86_64 |
| 20 | + runner: ubuntu-latest |
| 21 | + - arch: arm64 |
| 22 | + runner: ubuntu-22.04-arm |
24 | 23 | steps:
|
25 | 24 | - uses: actions/checkout@v4
|
26 |
| - - run: ${{ matrix.compiler }} --version |
| 25 | + |
| 26 | + - name: Install compilers |
| 27 | + run: sudo apt-get update && sudo apt-get install -y gcc clang |
| 28 | + |
| 29 | + - name: Compiler version |
| 30 | + run: ${{ matrix.cc }} --version |
| 31 | + |
27 | 32 | - name: Build
|
28 |
| - run: ./tools/ci-build.sh CC=${{ matrix.compiler }} |
| 33 | + run: ./tools/ci-build.sh CC=${{ matrix.cc }} --cores=2 |
| 34 | + |
29 | 35 | - name: Test
|
30 | 36 | run: make check
|
| 37 | + |
| 38 | + macos: |
| 39 | + name: macOS ${{ matrix.variant }} |
| 40 | + runs-on: ${{ matrix.runner }} |
| 41 | + strategy: |
| 42 | + fail-fast: false |
| 43 | + matrix: |
| 44 | + include: |
| 45 | + - variant: arm64 |
| 46 | + runner: macos-latest # Arm64 |
| 47 | + - variant: x86_64 |
| 48 | + runner: macos-13 # x86-64 |
| 49 | + steps: |
| 50 | + - uses: actions/checkout@v4 |
| 51 | + - run: ./tools/ci-build.sh --cores=2 |
| 52 | + - run: make check |
| 53 | + |
| 54 | + freebsd: |
| 55 | + name: "FreeBSD ${{ matrix.version }} / ${{ matrix.arch }} / ${{ matrix.cc }}" |
| 56 | + runs-on: ubuntu-latest |
| 57 | + strategy: |
| 58 | + fail-fast: false |
| 59 | + matrix: |
| 60 | + version: ['13.3', '14.2', '15.0'] |
| 61 | + arch: ['x86_64', 'aarch64'] |
| 62 | + cc: ['clang', 'gcc'] |
| 63 | + steps: |
| 64 | + - uses: actions/checkout@v4 |
| 65 | + |
| 66 | + - name: Build & Test inside FreeBSD |
| 67 | + |
| 68 | + with: |
| 69 | + release: ${{ matrix.version }} |
| 70 | + arch: ${{ matrix.arch }} |
| 71 | + mem: 6144 |
| 72 | + cpu: 2 |
| 73 | + usesh: true |
| 74 | + sync: rsync |
| 75 | + prepare: | |
| 76 | + pkg install -y gcc gmake |
| 77 | + run: | |
| 78 | + ${{ matrix.cc }} --version |
| 79 | + ./tools/ci-build.sh CC=${{ matrix.cc }} --cores=2 |
| 80 | + make check |
0 commit comments