build-macos-intel #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
brew install ninja | |
brew install pkg-config | |
brew install curl | |
brew install qt6 | |
- 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 \ | |
-DDOWNLOAD_CURL_CABUNDLE=ON | |
- 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 artifact | |
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 644 AppDir/usr/local/e2\ SAT\ Editor.app/Contents/Frameworks/*.dylib | |
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} | |
mv AppDir/usr/local/Readme.txt ../artifact/ | |
mv AppDir/usr/local/License.txt ../artifact/ | |
mv AppDir/usr/local/e2\ SAT\ Editor.app ../artifact/ | |
mv AppDir/usr/local/e2se-cli ../artifact/cli/ | |
mv "${{github.workspace}}/user-manual" ../artifact/ | |
- name: Tar artifact | |
working-directory: ${{github.workspace}}/e2-sat-editor | |
run: tar -cvf artifact.tar artifact | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ${{github.workspace}}/e2-sat-editor/artifact.tar |