-
Notifications
You must be signed in to change notification settings - Fork 6
81 lines (71 loc) · 2.46 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
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
name: build
on:
- push
- pull_request
jobs:
flake-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix flake check
build:
runs-on: ubuntu-latest
strategy:
matrix:
installable:
- "brender"
- "brender-samples"
- "brender-samples-clang"
- "brender-samples-win64"
- "brender-samples-win32"
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix build -L .#${{matrix.installable}}
build-ubuntu:
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: sudo apt install -y --no-install-recommends libsdl2-dev libglfw3-dev ninja-build
- name: Clone Repository
uses: actions/checkout@v4
- name: Configure
run: cmake -B build -G "Ninja Multi-Config"
- name: Build
run: cmake --build build --config Release --parallel
build-msvc2022:
runs-on: windows-2022
env:
VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite'
strategy:
matrix:
configuration:
- { platform: 'x64', soft: 'OFF', vcpkg_target: 'x64-windows' }
- { platform: 'Win32', soft: 'OFF', vcpkg_target: 'x86-windows' }
- { platform: 'Win32', soft: 'ON', vcpkg_target: 'x86-windows' }
steps:
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Clone Repository
uses: actions/checkout@v4
- name: Install SDL2
run: vcpkg install sdl2:${{ matrix.configuration.vcpkg_target }}
- name: Install GLFW3
run: vcpkg install glfw3:${{ matrix.configuration.vcpkg_target }}
- name: Configure
run: >
cmake -B build -G "Visual Studio 17 2022" -A ${{ matrix.configuration.platform }}
-DCMAKE_BUILD_TYPE=Release
-DBRENDER_BUILD_SOFT=${{ matrix.configuration.soft }}
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
- name: Build
run: cmake --build build --parallel