Codespace opulent parakeet r64rrvrvw7jhx5vp #15
Workflow file for this run
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 arm64 | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'src/**' | |
- '**/CMakeLists.txt' | |
- 'version.inc' | |
- 'bbl/**' | |
- 'resources/**' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'src/**' | |
- '**/CMakeLists.txt' | |
- 'version.inc' | |
- 'bbl/**' | |
- 'resources/**' | |
jobs: | |
build_osx_arm64: | |
name: Build macOS arm64 | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install tools | |
run: | | |
brew install cmake git gettext zstd | |
- run: mkdir -p ${{ github.workspace }}/deps/build_arm64 | |
- run: mkdir -p ${{ github.workspace }}/deps/build_arm64/GalaxySlicer_dep_arm64 | |
- name: Download and extract GalaxySlicer deps | |
working-directory: ${{ github.workspace }} | |
run: | | |
curl -LJO https://github.com/fr3ak2402/GalaxySlicer_deps/releases/download/September_23/GalaxySlicer_dep_macOS_arm64_05-09-23.tar.gz | |
tar -zxf GalaxySlicer_dep_macOS_arm64_05-09-23.tar.gz -C ${{ github.workspace }}/deps/build_arm64 | |
chown -R $(id -u):$(id -g) ${{ github.workspace }}/deps/build_arm64/GalaxySlicer_dep_arm64 | |
ls -l ${{ github.workspace }}/deps/build_arm64/GalaxySlicer_dep_arm64 | |
rm GalaxySlicer_dep_macOS_arm64_05-09-23.tar.gz | |
- name: Build GalaxySlicer | |
working-directory: ${{ github.workspace }} | |
run: | | |
./build_release_macos.sh -s -n -a arm64 | |
#- name: Sign GalaxySlicer | |
# working-directory: ${{ github.workspace }} | |
# if: github.event_name != 'pull_request' | |
# env: | |
# BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} | |
# P12_PASSWORD: ${{ secrets.P12_PASSWORD }} | |
# KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} | |
# CERTIFICATE_ID: ${{ secrets.MACOS_CERTIFICATE_ID }} | |
# run: | | |
# CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 | |
# KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db | |
# echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH | |
# security create-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH | |
# security set-keychain-settings -lut 21600 $KEYCHAIN_PATH | |
# security unlock-keychain -p $KEYCHAIN_PASSWORD $KEYCHAIN_PATH | |
# security import $CERTIFICATE_PATH -P $P12_PASSWORD -A -t cert -f pkcs12 -k $KEYCHAIN_PATH | |
# security list-keychain -d user -s $KEYCHAIN_PATH | |
# security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $P12_PASSWORD $KEYCHAIN_PATH | |
# codesign --deep --force --verbose --sign "$CERTIFICATE_ID" ${{ github.workspace }}/build_arm64/GalaxySlicer/GalaxySlicer.app | |
- name: Pack GalaxySlicer | |
working-directory: ${{ github.workspace }} | |
run: | | |
export ver=$(grep '^#define GalaxySlicer_VERSION' ./build_arm64/src/libslic3r/libslic3r_version.h | cut -d ' ' -f3) | |
ver="_V${ver//\"}" | |
cd ${{ github.workspace }}/build_arm64/GalaxySlicer | |
zip -FSrq GalaxySlicer${ver}_Mac_AppleSilicon_signed.zip ./GalaxySlicer.app | |
#- name: Create DMG | |
# uses: QQxiaoming/create-dmg-action@v0.0.2 | |
# with: | |
# name: 'GalaxySlicer' | |
# srcdir: '${{ github.workspace }}/build_arm64/GalaxySlicer/GalaxySlicer.app' | |
#- name: Upload GalaxySlicer.dmg | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: GalaxySlicer.dmg | |
# path: GalaxySlicer.dmg | |
- name: Upload GalaxySlicer*.zip | |
uses: actions/upload-artifact@v3 | |
with: | |
name: GalaxySlicer_macOS_arm64_nightly | |
path: ${{ github.workspace }}/build_arm64/GalaxySlicer/GalaxySlicer*.zip |