-
-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (72 loc) · 2.55 KB
/
build-macos-intel.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
name: build-macos-intel
on:
workflow_dispatch:
jobs:
user-manual:
uses: ./.github/workflows/user-manual.yml
with:
runs-on: ubuntu-latest
build:
runs-on: macos-12
needs: user-manual
env:
BUILD_TYPE: Release
steps:
- uses: actions/checkout@v4
with:
repository: ctlcltd/e2-sat-editor
path: e2-sat-editor
- name: Setup Homebrew
continue-on-error: true
run: |
brew remove --ignore-dependencies --force $(brew list)
brew cleanup
brew update
brew install cmake ninja qt6 curl
- name: Configure CMake
working-directory: ${{github.workspace}}/e2-sat-editor/src
run: |
export PKG_CONFIG_PATH="/usr/local/opt/curl/lib/pkgconfig"
cmake \
-G Ninja \
-B build \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DRELEASE_MEDIUM=github
- name: Build
working-directory: ${{github.workspace}}/e2-sat-editor/src
run: cmake --build build --config ${{ env.BUILD_TYPE }}
- name: Download user-manual artifact
uses: actions/download-artifact@v4
with:
name: user-manual
path: user-manual
run-id: ${{ needs.user-manual.outputs.run-id }}
- name: Deploy
working-directory: ${{github.workspace}}/e2-sat-editor/src
continue-on-error: true
run: |
DESTDIR=../AppDir ninja -C build install
cp ../dist/macos/PkgInfo.in AppDir/usr/local/e2\ SAT\ Editor.app/Contents/PkgInfo
# pre actions
QMDIR=AppDir/usr/local/e2\ SAT\ Editor.app/Contents/Resources/translations
mkdir -p "$QMDIR"
cp ../dist/translations/*.qm "$QMDIR"
cp /usr/local/opt/qt/share/qt/translations/qt_*.qm "$QMDIR"
cp /usr/local/opt/qt/share/qt/translations/qtbase_*.qm "$QMDIR"
rm -R "$QMDIR"/qt_help_*.qm
# run deploy script
bash ../scripts/deployqtmacx.sh AppDir/usr/local/e2\ SAT\ Editor.app
# post actions
chmod +x AppDir/usr/local/e2\ SAT\ Editor.app/Contents/MacOS/e2\ SAT\ Editor
chmod +x AppDir/usr/local/e2se-cli
# package
mkdir -p ../artifact/{cli,user-manual}
cp ../dist/common/Readme.txt.in ../artifact/Readme.txt
cp COPYING ../artifact/License.txt
mv AppDir/usr/local/e2\ SAT\ Editor.app ../artifact/
mv AppDir/usr/local/e2se-cli ../artifact/cli/
mv "${{github.workspace}}/user-manual" ../artifact/
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
path: ${{github.workspace}}/e2-sat-editor/artifact