Skip to content

Commit 4a3a5bf

Browse files
committed
CI for macOS
1 parent b1bf4d7 commit 4a3a5bf

File tree

20 files changed

+3395
-0
lines changed

20 files changed

+3395
-0
lines changed
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Build and Test on macOS arm64
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'src/**'
8+
- '!src/Plugins/Windows/**'
9+
- 'tests/**'
10+
- 'xmake.lua'
11+
- 'xmake/packages.lua'
12+
- 'xmake/research.lua'
13+
- 'xmake/packages/**'
14+
- 'xmake-requires.lock'
15+
- '.github/workflows/ci-macos-arm64.yml'
16+
pull_request:
17+
branches: [ main ]
18+
paths:
19+
- 'src/**'
20+
- '!src/Plugins/Windows/**'
21+
- 'tests/**'
22+
- 'xmake.lua'
23+
- 'xmake/packages.lua'
24+
- 'xmake/research.lua'
25+
- 'xmake/packages/**'
26+
- 'xmake-requires.lock'
27+
- '.github/workflows/ci-macos-arm64.yml'
28+
29+
jobs:
30+
macosbuild:
31+
strategy:
32+
matrix:
33+
os: [macos-13]
34+
arch: [arm64]
35+
runs-on: ${{ matrix.os }}
36+
timeout-minutes: 45
37+
if: always()
38+
steps:
39+
- uses: actions/checkout@v4
40+
with:
41+
fetch-depth: 1
42+
- name: cache xmake
43+
uses: actions/cache@v4
44+
with:
45+
path: |
46+
${{github.workspace}}/build/.build_cache
47+
/Users/runner/.xmake
48+
key: xmake-${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('xmake-requires.lock') }}
49+
- name: Install Qt
50+
uses: jurplel/install-qt-action@v3
51+
with:
52+
version: 6.5.3
53+
target: 'desktop'
54+
cache: 'true'
55+
56+
- name: set XMAKE_GLOBALDIR
57+
run: echo "XMAKE_GLOBALDIR=${{ runner.workspace }}/xmake-global" >> $GITHUB_ENV
58+
59+
- uses: xmake-io/github-action-setup-xmake@v1
60+
with:
61+
xmake-version: v2.8.7
62+
actions-cache-folder: '.xmake-cache'
63+
64+
- name: xmake repo --update
65+
run: xmake repo --update
66+
67+
- name: cache packages from xrepo
68+
uses: actions/cache@v3
69+
with:
70+
path: |
71+
${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
72+
key: xrepo-${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('xmake-requires.lock') }}
73+
74+
- name: cache xmake
75+
uses: actions/cache@v3
76+
with:
77+
path: |
78+
${{ runner.workspace }}/build/.build_cache
79+
key: xmake-build-${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('xmake-requires.lock') }}
80+
81+
- name: config
82+
run: xmake config --policies=build.ccache -o ${{ runner.workspace }}/build -m releasedbg -a ${{ matrix.arch }} --yes
83+
- name: build
84+
run: xmake build --yes -vD research && xmake build --yes -vD --group=tests
85+
- name: C++ tests
86+
run: xmake run --yes --verbose --diagnosis --group=tests
87+
env:
88+
QT_QPA_PLATFORM: offscreen
89+
- name: Scheme tests
90+
run: xmake run --yes -vD --group=scheme_tests
91+
- name: integration test
92+
run: xmake run --yes -vD --group=integration_tests
93+
env:
94+
QT_QPA_PLATFORM: offscreen
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Build and Test on macOS
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'src/**'
8+
- '!src/Plugins/Windows/**'
9+
- 'TeXmacs/plugins/goldfish/src/*'
10+
- 'tests/**'
11+
- 'xmake.lua'
12+
- 'xmake/packages.lua'
13+
- 'xmake/research.lua'
14+
- 'xmake/packages/**'
15+
- 'xmake-requires.lock'
16+
- '.github/workflows/ci-xmake-macos.yml'
17+
pull_request:
18+
branches: [ main ]
19+
paths:
20+
- 'src/**'
21+
- '!src/Plugins/Windows/**'
22+
- 'TeXmacs/plugins/goldfish/src/*'
23+
- 'tests/**'
24+
- 'xmake.lua'
25+
- 'xmake/packages.lua'
26+
- 'xmake/research.lua'
27+
- 'xmake/packages/**'
28+
- 'xmake-requires.lock'
29+
- '.github/workflows/ci-xmake-macos.yml'
30+
31+
jobs:
32+
macosbuild:
33+
strategy:
34+
matrix:
35+
os: [macos-13]
36+
arch: [x86_64]
37+
runs-on: macos-13
38+
timeout-minutes: 45
39+
if: always()
40+
steps:
41+
- uses: actions/checkout@v4
42+
with:
43+
fetch-depth: 1
44+
- name: cache xmake
45+
uses: actions/cache@v4
46+
with:
47+
path: |
48+
${{github.workspace}}/build/.build_cache
49+
/Users/runner/.xmake
50+
key: xmake-${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('xmake-requires.lock') }}
51+
- name: Install Qt
52+
uses: jurplel/install-qt-action@v3
53+
with:
54+
version: 6.5.3
55+
target: 'desktop'
56+
cache: 'true'
57+
58+
- name: set XMAKE_GLOBALDIR
59+
run: echo "XMAKE_GLOBALDIR=${{ runner.workspace }}/xmake-global" >> $GITHUB_ENV
60+
61+
- uses: xmake-io/github-action-setup-xmake@v1
62+
with:
63+
xmake-version: v2.8.7
64+
actions-cache-folder: '.xmake-cache'
65+
66+
- name: xmake repo --update
67+
run: xmake repo --update
68+
69+
- name: cache packages from xrepo
70+
uses: actions/cache@v3
71+
with:
72+
path: |
73+
${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
74+
key: xrepo-${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('xmake-requires.lock') }}
75+
76+
- name: cache xmake
77+
uses: actions/cache@v3
78+
with:
79+
path: |
80+
${{ runner.workspace }}/build/.build_cache
81+
key: xmake-build-${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('xmake-requires.lock') }}
82+
83+
- name: config
84+
run: xmake config --policies=build.ccache -o ${{ runner.workspace }}/build -m releasedbg --yes
85+
- name: build
86+
run: xmake build --yes -vD research && xmake build --yes -vD --group=tests
87+
- name: C++ tests
88+
run: xmake run --yes --verbose --diagnosis --group=tests
89+
env:
90+
QT_QPA_PLATFORM: offscreen
91+
- name: Scheme tests
92+
run: xmake run --yes -vD --group=scheme_tests
93+
- name: integration test
94+
run: xmake run --yes -vD --group=integration_tests
95+
env:
96+
QT_QPA_PLATFORM: offscreen
19.1 MB
Binary file not shown.
18.6 MB
Binary file not shown.
26 MB
Binary file not shown.
25.1 MB
Binary file not shown.
788 Bytes
Binary file not shown.
768 Bytes
Binary file not shown.
764 Bytes
Binary file not shown.
764 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)