build-macos-intel #13
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 MacPorts | |
uses: melusina-org/setup-macports@v1.1.3 | |
- continue-on-error: true | |
run: | | |
sudo port -N selfupdate | |
- name: Install port packages | |
continue-on-error: true | |
run: | | |
sudo port -N install pkgconfig | |
sudo port -N install cmake ninja | |
sudo port -N install curl | |
sudo port -N install qt6-qtbase qt6-qttranslations | |
- name: Configure CMake | |
working-directory: ${{github.workspace}}/e2-sat-editor/src | |
run: | | |
export PKG_CONFIG_PATH="/opt/local/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 /opt/local/libexec/qt6/translations/qt_*.qm "$QMDIR" | |
cp /opt/local/libexec/qt6/translations/qtbase_*.qm "$QMDIR" | |
rm -R "$QMDIR"/qt_help_*.qm | |
# run deploy script | |
bash ../scripts/deployqtmacx.sh AppDir/usr/local/e2\ SAT\ Editor.app -environment port | |
# post actions | |
chmod 644 AppDir/usr/local/e2\ SAT\ Editor.app/Contents/Frameworks/*.dylib | |
chmod -R 755 AppDir/usr/local/e2\ SAT\ Editor.app/Contents/Frameworks/*.framework | |
chmod 644 AppDir/usr/local/e2\ SAT\ Editor.app/Contents/Frameworks/**/**/**/* | |
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 |