Add entitlements for QtWebEngineCore.app #5823
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
on: | |
push: | |
paths: | |
- 'installers/macOS/**' | |
- '.github/workflows/installer-macos.yml' | |
- 'requirements/*.yml' | |
- 'MANIFEST.in' | |
- '**.bat' | |
- '**.py' | |
- '**.sh' | |
- '!**.md' | |
- '!installers/Windows/**' | |
- '!.github/workflows/installer-win.yml' | |
release: | |
types: | |
- created | |
name: Create macOS App Bundle and DMG | |
jobs: | |
matrix_prep: | |
name: Determine Build Matrix | |
runs-on: macos-10.15 | |
outputs: | |
build_type: ${{ steps.set-matrix.outputs.build_type }} | |
steps: | |
- id: set-matrix | |
run: | | |
if [[ ${GITHUB_EVENT_NAME} == 'push' ]]; then | |
build_type=$(echo "['Full', 'Lite']") | |
else | |
build_type=$(echo "['Full']") | |
fi | |
echo "::set-output name=build_type::{'build_type':$(echo $build_type)}" | |
build: | |
name: macOS App Bundle | |
runs-on: macos-10.15 | |
needs: matrix_prep | |
strategy: | |
matrix: ${{fromJson(needs.matrix_prep.outputs.build_type)}} | |
defaults: | |
run: | |
shell: bash -l {0} | |
working-directory: ${{ github.workspace }}/installers/macOS | |
env: | |
LITE_FLAG: ${{ matrix.build_type == 'Lite' && '--lite' || '' }} | |
DMGNAME: ${{ matrix.build_type == 'Lite' && 'Spyder-Lite.dmg' || 'Spyder.dmg' }} | |
DISTDIR: ${{ github.workspace }}/dist | |
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }} | |
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }} | |
APPLICATION_PWD: ${{ secrets.APPLICATION_PWD }} | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9.5' | |
architecture: 'x64' | |
- name: Install Dependencies | |
run: | | |
INSTALL_FLAGS=() | |
if [[ -z ${LITE_FLAG} ]]; then | |
INSTALL_FLAGS+=('-r' 'req-scientific.txt') | |
fi | |
${pythonLocation}/bin/python -m pip install -U pip setuptools | |
${pythonLocation}/bin/python -m pip install -r req-build.txt -r req-extras.txt -r req-plugins.txt "${INSTALL_FLAGS[@]}" -e ${GITHUB_WORKSPACE} | |
- name: Install Subrepos | |
if: ${{github.event_name == 'release'}} | |
run: ${pythonLocation}/bin/python -bb -X dev -W error ${GITHUB_WORKSPACE}/install_dev_repos.py --not-editable --no-install spyder | |
- name: Show Build Environment | |
run: | | |
${pythonLocation}/bin/python -V -V | |
${pythonLocation}/bin/python -m pip list | |
- name: Install Micromamba | |
working-directory: ${{ github.workspace }}/spyder | |
run: | | |
curl -Ls https://micro.mamba.pm/api/micromamba/osx-64/latest | tar -xvj bin/micromamba | |
install_name_tool -change @rpath/libc++.1.dylib /usr/lib/libc++.1.dylib bin/micromamba | |
- name: Build Application Bundle | |
run: ${pythonLocation}/bin/python setup.py ${LITE_FLAG} --dist-dir ${DISTDIR} | |
- name: Create Keychain | |
if: ${{github.event_name == 'push'}} | |
run: ./certkeychain.sh "${MACOS_CERTIFICATE}" "${MACOS_CERTIFICATE_PWD}" | |
- name: Code Sign Application | |
if: ${{github.event_name == 'push'}} | |
run: | | |
pil=$(${pythonLocation} -c "import PIL, os; print(os.path.dirname(PIL.__file__))") | |
rm -v ${DISTDIR}/Spyder.app/Contents/Frameworks/liblzma.5.dylib | |
cp -v ${pil}/.dylibs/liblzma.5.dylib ${DISTDIR}/Spyder.app/Contents/Frameworks/ | |
./codesign.sh -a "${DISTDIR}/Spyder.app" | |
- name: Test Application Bundle | |
run: ./test_app.sh -t 60 -d 10 ${DISTDIR} | |
- name: Build Disk Image | |
run: ${pythonLocation}/bin/python setup.py ${LITE_FLAG} --dist-dir ${DISTDIR} --dmg --no-app | |
- name: Sign Disk Image | |
if: ${{github.event_name == 'push'}} | |
run: ./codesign.sh "${DISTDIR}/${DMGNAME}" | |
- name: Notarize Disk Image | |
if: ${{github.event_name == 'push'}} | |
run: ./notarize.sh -i 30 -p "${APPLICATION_PWD}" "${DISTDIR}/${DMGNAME}" | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
path: ${{ env.DISTDIR }}/${{ env.DMGNAME }} | |
name: ${{ env.DMGNAME }} | |
- name: Get Release | |
if: ${{github.event_name == 'release'}} | |
id: get_release | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
uses: bruceadams/[email protected] | |
- name: Upload Release Asset | |
if: ${{github.event_name == 'release'}} | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: ${{ env.DISTDIR }}/${{ env.DMGNAME }} | |
asset_name: ${{ env.DMGNAME }} | |
asset_content_type: application/x-apple-diskimage |