-
Notifications
You must be signed in to change notification settings - Fork 529
69 lines (65 loc) · 2.03 KB
/
Copy pathbuild-linux-windows.yml
File metadata and controls
69 lines (65 loc) · 2.03 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
name: Build for Linux and Windows (x86, x64)
on:
workflow_call:
inputs:
update-caches:
description: "Whether to update the `ccache` or `bazel` caches, where possible."
default: false
required: false
type: boolean
jobs:
cmake-linux-x86_64:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v6
- name: Update apt
run: sudo apt update
- name: Install ninja
run: sudo apt install ninja-build
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ github.job }}
max-size: "500M"
save: ${{ inputs.update-caches }}
- name: Configure and build
run: scripts/build-local.sh
working-directory: ${{ github.workspace }}
- name: Upload Build Artifacts
uses: actions/upload-artifact@v6
with:
name: build-artifacts-linux-x86_64
path: build/local
cmake-windows-x86_64:
runs-on: windows-latest
timeout-minutes: 60
strategy:
matrix:
arch: [x86, x64]
steps:
- uses: actions/checkout@v6
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ github.job }}
max-size: "500M"
save: ${{ inputs.update-caches }}
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Setup build environment
shell: bash
run: |
echo "VCVARSALL=$(vswhere -products \* -latest -property installationPath)\\VC\\Auxiliary\\Build\\vcvarsall.bat" >> $GITHUB_ENV
- name: Configure and build
run: scripts/build-windows-${{ matrix.arch }}.cmd
shell: cmd
working-directory: ${{ github.workspace }}
env:
CFLAGS: "/UNDEBUG"
CXXFLAGS: "/UNDEBUG"
- name: Upload Build Artifacts
uses: actions/upload-artifact@v6
with:
name: build-artifacts-windows-${{ matrix.arch }}
path: build/windows/${{ matrix.arch }}/