forked from ran-j/PS2Recomp
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (67 loc) · 1.93 KB
/
build.yml
File metadata and controls
80 lines (67 loc) · 1.93 KB
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
name: build
on: [push, pull_request]
jobs:
linux-gcc-clang:
strategy:
fail-fast: false
matrix:
compiler: [gcc, clang]
name: linux-${{ matrix.compiler }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build libgl-dev libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev
- name: Configure
run: |
if [ "${{ matrix.compiler }}" = "gcc" ]; then
export CC=gcc
export CXX=g++
else
export CC=clang
export CXX=clang++
fi
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=-msse4.1 -DCMAKE_CXX_FLAGS=-msse4.1
- name: Build
run: cmake --build build --config Release
- name: Tests
run: ./build/ps2xTest/ps2x_tests
windows-msvc:
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
arch: x64
target_arch: x86_64
name: windows-msvc-${{ matrix.target_arch }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- uses: lukka/get-cmake@latest
- uses: TheMrMilchmann/setup-msvc-dev@v4
with:
arch: ${{ matrix.arch }}
- name: Build
shell: cmd
run: |
cmake -B build
cmake --build build --config Release
- name: Tests
shell: cmd
run: |
.\build\ps2xTest\Release\ps2x_tests.exe
- name: Upload artifact
uses: actions/upload-artifact@v6
with:
name: PS2Recomp - Windows
path: |
build/ps2xAnalyzer/Release/*.exe
build/ps2xRecomp/Release/*.exe
build/ps2xTest/Release/*.exe