Skip to content

Commit d1c5c87

Browse files
committed
ci/cd on macos
1 parent 0c4773f commit d1c5c87

File tree

2 files changed

+151
-0
lines changed

2 files changed

+151
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: CD for Liii STEM on macOS arm64
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- '*'
8+
9+
jobs:
10+
macosbuild:
11+
strategy:
12+
matrix:
13+
os: [macos-13]
14+
arch: [arm64]
15+
runs-on: ${{ matrix.os }}
16+
timeout-minutes: 45
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 1
21+
- name: Install Qt
22+
uses: jurplel/install-qt-action@v4
23+
with:
24+
version: 6.5.3
25+
target: 'desktop'
26+
cache: 'true'
27+
- uses: xmake-io/github-action-setup-xmake@v1
28+
with:
29+
xmake-version: v2.8.7
30+
actions-cache-folder: '.xmake-cache'
31+
32+
- name: cache packages from xrepo
33+
uses: actions/cache@v4
34+
with:
35+
path: |
36+
~/.xmake/packages
37+
key: xrepo-${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('xmake-requires.lock') }}
38+
39+
- name: xmake repo --update
40+
run: xmake repo --update
41+
- name: config
42+
run: xmake config -m release -a ${{ matrix.arch }} -vD --yes
43+
- name: build
44+
run: xmake build -vD --yes liii
45+
- name: install
46+
run: xmake install -vD liii
47+
- name: Generate Installer
48+
run: |
49+
xmake install -vD liii_packager
50+
- name: Upload
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: LiiiSTEM-macos-arm64-dmg
54+
path: build/LiiiSTEM-*.dmg
55+
- name: Release
56+
uses: softprops/action-gh-release@v1
57+
if: startsWith(github.ref, 'refs/tags/')
58+
with:
59+
prerelease: true
60+
files: build/LiiiSTEM-*.dmg
61+
62+
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Build and Test LiiiSTEM on macOS
2+
3+
on:
4+
push:
5+
branches: [ branch-1.2 ]
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-stem-macos.yml'
17+
pull_request:
18+
branches: [ branch-1.2 ]
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-stem-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@v4
71+
with:
72+
path: |
73+
${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
74+
key: xrepo-${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('xmake-requires.lock') }}
75+
76+
- name: config
77+
run: xmake config --policies=build.ccache -o ${{ runner.workspace }}/build -m releasedbg --yes
78+
- name: build
79+
run: xmake build --yes -vD liii && xmake build --yes -vD --group=tests
80+
- name: C++ tests
81+
run: bash bin/test_all
82+
env:
83+
QT_QPA_PLATFORM: offscreen
84+
- name: Scheme tests
85+
run: bash bin/test_all_scheme
86+
- name: integration test
87+
run: bash bin/test_all_integrated
88+
env:
89+
QT_QPA_PLATFORM: offscreen

0 commit comments

Comments
 (0)