-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (37 loc) · 1.07 KB
/
build.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
name: Build
on:
push:
branches:
- main
pull_request:
jobs:
build:
name: Build Debug
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Linux environment
if: matrix.os == 'ubuntu-latest'
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update -y
sudo apt-get install g++-13
echo "CXX=$(which g++-13)" >> $GITHUB_ENV
- name: Setup Windows environment
if: matrix.os == 'windows-latest'
run: |
echo "CXX=clang++" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Setup macOS environment
if: matrix.os == 'macos-latest'
run: |
brew install llvm
echo "CXX=$(brew --prefix llvm)/bin/clang++" >> $GITHUB_ENV
- name: Build
run: make debug CXX=${{ env.CXX }}
- name: Clean
run: make clean