Skip to content

Commit 8c42d9f

Browse files
CI: Add initial workflow (#2)
* CI: Add initial workflow * Update build.yml No need to specify the version of llvm, the latest is always fine. --------- Co-authored-by: KaruroChori <KaruroChori@users.noreply.github.com>
1 parent 7bf570e commit 8c42d9f

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

.github/workflows/build.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: build and test
2+
concurrency:
3+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
4+
cancel-in-progress: true
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
paths:
10+
- '**'
11+
- '!**.yml'
12+
- '!**.md'
13+
- '**/build.yml'
14+
pull_request:
15+
branches: [ master ]
16+
paths:
17+
- '**'
18+
- '!**.yml'
19+
- '!**.md'
20+
- '**/build.yml'
21+
22+
jobs:
23+
linux:
24+
runs-on: ubuntu-24.04
25+
steps:
26+
- uses: actions/checkout@v4
27+
- name: Install dependencies
28+
run: |
29+
sudo apt update
30+
sudo apt remove -y firefox
31+
sudo apt upgrade -y
32+
sudo apt install -y \
33+
python3-pip \
34+
python3-setuptools
35+
python3 -m pip install meson ninja
36+
37+
- name: Configure and build
38+
run: |
39+
meson setup build
40+
meson compile -C build
41+
42+
macos:
43+
runs-on: macos-14
44+
env:
45+
LDFLAGS: '-L/opt/homebrew/opt/llvm/lib'
46+
CPPFLAGS: '-I/opt/homebrew/opt/llvm/include'
47+
steps:
48+
- uses: actions/checkout@v4
49+
- name: Install dependencies
50+
run: |
51+
brew update
52+
brew install \
53+
llvm \
54+
meson \
55+
ninja
56+
PATH=/opt/homebrew/opt/llvm/bin:$PATH
57+
echo "PATH=$PATH" >> $GITHUB_ENV
58+
59+
- name: Configure and build
60+
run: |
61+
meson setup build
62+
meson compile -C build
63+

0 commit comments

Comments
 (0)