-
Notifications
You must be signed in to change notification settings - Fork 2
123 lines (119 loc) · 3.48 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
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
119
120
121
122
123
name: Building & Testing
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-build
cancel-in-progress: true
on:
workflow_call:
push:
branches: [master]
paths:
- "**"
- "!**.yml"
- "!docs/**"
- "!docker/**"
- "!**.md"
- "**/build.yml"
pull_request:
branches: [master]
paths:
- "**"
- "!**.yml"
- "!docs/**"
- "!docker/**"
- "!**.md"
- "**/build.yml"
jobs:
format-checks:
uses: ./.github/workflows/format.yml
linux-amd64:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04]
runs-on: ${{ matrix.os }}
timeout-minutes: 8
env:
CC: clang-19
CXX: clang++-19
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
if [ "${{ contains(matrix.os, 'ubuntu') }}" = "true" ]; then
sudo apt update
curl -fsSL https://bun.sh/install | bash
echo "PATH=$HOME/.bun/bin:$PATH" >> $GITHUB_ENV
sudo apt update
sudo apt remove -y firefox
sudo apt upgrade -y
sudo apt install -y \
freeglut3-dev \
libcurl4-openssl-dev \
libpng-dev \
libsqlite3-0 \
python3-pip \
python3-setuptools
python3 -m pip install meson ninja
python3 -m pip uninstall cmake
python3 -m pip install cmake==3.30.5 # workaround https://github.com/mesonbuild/meson/issues/13888
# for clang
sudo apt install -y wget gpg gnupg software-properties-common
curl -LO https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 19 # install clang-19
else
brew update
brew install meson ninja
fi
- name: Configure and build
run: |
cmake --version
bun install
bun run codegen
bun run meson-setup.clang-release
meson compile -C build/ vs:executable
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: ubuntu-meson-logs
path: |
build/meson-logs/**/*
macos-arm64:
runs-on: macos-14
timeout-minutes: 8
env:
LDFLAGS: "-L/opt/homebrew/opt/llvm/lib"
CPPFLAGS: "-I/opt/homebrew/opt/llvm/include"
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
curl -fsSL https://bun.sh/install | bash
PATH=$HOME/.bun/bin:$PATH
brew update
brew install \
llvm@19 \
freeglut \
libpng \
meson \
ninja
brew install --cask xquartz
cd /opt/homebrew/opt/llvm/bin
#ln -s clang++ clang++-19
PATH=/opt/homebrew/opt/llvm/bin:$PATH
echo "PATH=$PATH" >> $GITHUB_ENV
- name: Configure and build
run: |
cmake --version
bun install
bun run codegen
meson setup -Dforce_x11_backend=true --reconfigure build/ --buildtype=release --native-file toolchains/flatpak.ini
# Unclear fix to be investigated
rm subprojects/libtcc/VERSION
meson compile -C build/ vs:executable
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: macos14-meson-logs
path: |
build/meson-logs/**/*