-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.28 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
46
47
48
49
50
51
name: C++ CI Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
name: "Linux x64"
asset_name: "MCRandomProxy-Linux"
filepath: "./build/MCRandomProxy"
- os: windows-latest
name: "Windows"
asset_name: "MCRandomProxy-Windows.exe"
filepath: "./build/Release/MCRandomProxy.exe"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install dependencies (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y g++ cmake make
- name: Install dependencies (Windows)
if: matrix.os == 'windows-latest'
run: |
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'
choco install mingw
- name: Configure CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build --config Release
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.asset_name }}
path: ${{ matrix.filepath }}