-
Notifications
You must be signed in to change notification settings - Fork 949
118 lines (99 loc) · 3.65 KB
/
daily-builds.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
name: daily-builds
on:
# TODO: Remove this. This is for testing
schedule:
- cron: '0 6 * * *' # run at 6 AM UTC
workflow_dispatch:
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
name: Build ${{ matrix.name }}
strategy:
matrix:
include:
# Build with these flags
- name: generic
container: alpine-dev
flags: "-DMARCH_OPT=-march=x86-64"
- name: fedora
container: fedora:30
timeout-minutes: 45
container:
image: ghcr.io/romange/${{ matrix.container }}
options: --security-opt seccomp=unconfined
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.4
- name: Configure Cache Env
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: Install dependencies
run: |
cmake --version
mkdir -p $GITHUB_WORKSPACE/build
- name: Install packages
if: matrix.container == 'fedora:30'
run: |
echo Passed
- name: Configure & Build
run: |
cd $GITHUB_WORKSPACE/build
cmake .. -DCMAKE_BUILD_TYPE=Debug -GNinja -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_C_COMPILER_LAUNCHER=sccache \
${{ matrix.flags }}
ninja src/all
- name: Test
run: |
cd $GITHUB_WORKSPACE/build
ctest -V -L DFLY
build-macos:
runs-on: macos-13
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.4
- name: Configure Cache Env
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: Install dependencies
run: |
# Remove Python3 symlinks in /usr/local/bin as workaround to brew update issues
# https://github.com/actions/setup-python/issues/577
rm /usr/local/bin/2to3* || :
rm /usr/local/bin/idle3* || :
rm /usr/local/bin/pydoc* || :
rm /usr/local/bin/python3* || :
brew update && brew install ninja boost automake zstd bison
mkdir -p $GITHUB_WORKSPACE/build
- name: Configure & Build
run: |
cd $GITHUB_WORKSPACE/build
export PATH=/usr/local/opt/bison/bin:$PATH
gcc-12 --version
bison --version
echo "*************************** START BUILDING **************************************"
CC=gcc-12 CXX=g++-12 cmake .. -DCMAKE_BUILD_TYPE=Debug -GNinja -DWITH_UNWIND=OFF \
-DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_FLAGS="-Wl,-ld_classic"
ninja src/all
- name: Test
run: |
cd $GITHUB_WORKSPACE/build
ctest -V -L DFLY