-
Notifications
You must be signed in to change notification settings - Fork 6
127 lines (120 loc) · 5.06 KB
/
validate.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: validate
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-linux:
runs-on: ${{ matrix.arch == 'x64' && 'ubuntu-22.04' || 'blaze/ubuntu-22.04' }}
strategy:
matrix:
type: [ Debug, Release ]
arch: [ x64, arm64 ]
name: ubuntu (${{ matrix.arch }}, ${{ matrix.type }})
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ runner.os }}-z64re-ccache-${{ matrix.type }}-${{ matrix.arch }}
- name: Install Linux Dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build lld llvm clang-15
- name: Generate CMake Project
run: |
# enable ccache
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cmake -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER=clang++-15 -DCMAKE_C_COMPILER=clang-15 -DCMAKE_MAKE_PROGRAM=ninja -G Ninja -S . -B cmake-build
- name: Build ultramodern
run: |
# enable ccache
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cmake --build cmake-build --config ${{ matrix.type }} --target ultramodern -j $(nproc)
- name: Build librecomp
run: |
# enable ccache
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cmake --build cmake-build --config ${{ matrix.type }} --target librecomp -j $(nproc)
build-windows:
runs-on: windows-latest
strategy:
matrix:
type: [ Debug, Release ]
name: windows (x64, ${{ matrix.type }})
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ runner.os }}-z64re-ccache-${{ matrix.type }}
- name: Install Windows Dependencies
run: |
choco install ninja
Remove-Item -Path "C:\ProgramData\Chocolatey\bin\ccache.exe" -Force -ErrorAction SilentlyContinue
- name: Configure Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
- name: Generate CMake Project
run: |
# enable ccache
set $env:PATH="$env:USERPROFILE/.cargo/bin;$env:PATH"
# remove LLVM from PATH so it doesn't overshadow the one provided by VS
$env:PATH = ($env:PATH -split ';' | Where-Object { $_ -ne 'C:\Program Files\LLVM\bin' }) -join ';'
cmake -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_MAKE_PROGRAM=ninja -G Ninja -S . -B cmake-build -DCMAKE_CXX_FLAGS="-Xclang -fexceptions -Xclang -fcxx-exceptions"
- name: Build ultramodern
run: |
# enable ccache
set $env:PATH="$env:USERPROFILE/.cargo/bin;$env:PATH"
$cpuCores = (Get-CimInstance -ClassName Win32_Processor).NumberOfLogicalProcessors
cmake --build cmake-build --config ${{ matrix.type }} --target ultramodern -j $cpuCores
- name: Build librecomp
run: |
# enable ccache
set $env:PATH="$env:USERPROFILE/.cargo/bin;$env:PATH"
$cpuCores = (Get-CimInstance -ClassName Win32_Processor).NumberOfLogicalProcessors
cmake --build cmake-build --config ${{ matrix.type }} --target librecomp -j $cpuCores
build-macos:
runs-on: ${{ matrix.arch == 'x64' && 'macos-13' || 'macos-14' }}
strategy:
matrix:
type: [ Debug, Release ]
arch: [ x64, arm64 ]
name: macos (${{ matrix.arch }}, ${{ matrix.type }})
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ runner.os }}-z64re-ccache-${{ matrix.type }}-${{ matrix.arch }}
- name: Install macOS Dependencies
run: |
brew install ninja
- name: Generate CMake Project
run: |
# enable ccache
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cmake -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_MAKE_PROGRAM=ninja -G Ninja -S . -B cmake-build
- name: Build ultramodern
run: |
# enable ccache
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cmake --build cmake-build --config ${{ matrix.type }} --target ultramodern -j $(sysctl -n hw.ncpu)
- name: Build librecomp
run: |
# enable ccache
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cmake --build cmake-build --config ${{ matrix.type }} --target librecomp -j $(sysctl -n hw.ncpu)