|
| 1 | +name: Build for macOS (ARM) |
| 2 | + |
| 3 | +on: |
| 4 | + push: # All branches, but appropriate paths only. |
| 5 | + paths: |
| 6 | + # This workflow spec and its support scripts |
| 7 | + - '.github/workflows/macos.yml' |
| 8 | + - 'scripts/ci/*build.sh' |
| 9 | + - 'deploy/**' |
| 10 | + # Relevant sources for this platform |
| 11 | + - 'building/macos*ARM*/**' # Makefile-based build scripts |
| 12 | + - '*src/**' # Generated VMMaker sources (incl. plugins) |
| 13 | + - 'platforms/Cross/**' |
| 14 | + - 'platforms/iOS/**' # Note that 'platforms/Mac OS' is deprecated |
| 15 | + # Skip changes in documentation artifacts |
| 16 | + - '!**.md' |
| 17 | + - '!**HowToBuild' |
| 18 | + pull_request: |
| 19 | + branches: |
| 20 | + - Cog |
| 21 | + paths: |
| 22 | + # This workflow spec and its support scripts |
| 23 | + - '.github/workflows/macos.yml' |
| 24 | + - 'scripts/ci/*build.sh' |
| 25 | + - 'deploy/**' |
| 26 | + # Relevant sources for this platform |
| 27 | + - 'building/macos*ARM*/**' # Makefile-based build scripts |
| 28 | + - '*src/**' # Generated VMMaker sources (incl. plugins) |
| 29 | + - 'platforms/Cross/**' |
| 30 | + - 'platforms/iOS/**' # Note that 'platforms/Mac OS' is deprecated |
| 31 | + # Skip changes in documentation artifacts |
| 32 | + - '!**.md' |
| 33 | + - '!**HowToBuild' |
| 34 | + workflow_dispatch: |
| 35 | + inputs: |
| 36 | + tag: |
| 37 | + description: "Build new release candidate for tag" |
| 38 | + required: true |
| 39 | + default: YYYYMMDDHHMM |
| 40 | + |
| 41 | +jobs: |
| 42 | + build: |
| 43 | + strategy: |
| 44 | + fail-fast: true |
| 45 | + matrix: |
| 46 | + arch: |
| 47 | + - macos64ARMv8 |
| 48 | + flavor: |
| 49 | + - squeak.cog.spur |
| 50 | + # - squeak.sista.spur # -Werror bc. decl. missing |
| 51 | + - squeak.stack.spur |
| 52 | + # - pharo.cog.spur |
| 53 | + # - pharo.sista.spur # -Werror bc. decl. missing |
| 54 | + # - pharo.stack.spur |
| 55 | + mode: |
| 56 | + - fast |
| 57 | + - debug |
| 58 | + - assert |
| 59 | + |
| 60 | + runs-on: macos-10.15 # macos-11 macos-latest |
| 61 | + name: ${{ matrix.flavor }} for ${{ matrix.arch }}${{ matrix.mode == 'debug' && ' (DEBUG)' || matrix.mode == 'assert' && ' (ASSERT)' || '' }} |
| 62 | + env: |
| 63 | + ARCH: ${{ matrix.arch }} |
| 64 | + FLAVOR: ${{ matrix.flavor }} |
| 65 | + MODE: ${{ matrix.mode }} |
| 66 | + steps: |
| 67 | + - name: Checkout files |
| 68 | + if: github.event_name != 'workflow_dispatch' |
| 69 | + uses: actions/checkout@v2 |
| 70 | + |
| 71 | + - name: Checkout files for new release candidate |
| 72 | + if: github.event_name == 'workflow_dispatch' |
| 73 | + uses: actions/checkout@v2 |
| 74 | + with: |
| 75 | + ref: refs/tags/${{ github.event.inputs.tag }} |
| 76 | + |
| 77 | + - name: Restore build cache |
| 78 | + uses: actions/cache@v2 |
| 79 | + with: |
| 80 | + path: .thirdparty-cache |
| 81 | + key: thirdparty-cache-macos |
| 82 | + |
| 83 | + - name: Build VM |
| 84 | + run: ./scripts/ci/actions_build.sh |
| 85 | + |
| 86 | + - name: Sign VM |
| 87 | + continue-on-error: true # Save unsigned build artifacts |
| 88 | + run: ./deploy/sign-vm.sh |
| 89 | + env: |
| 90 | + SQUEAK_SIGN_PASSWORD: ${{ secrets.SQUEAK_SIGN_PASSWORD }} |
| 91 | + SQUEAK_CERT_PASSWORD: ${{ secrets.SQUEAK_CERT_PASSWORD }} |
| 92 | + SQUEAK_SIGN_IDENTITY: ${{ secrets.SQUEAK_SIGN_IDENTITY }} |
| 93 | + PHARO_SIGN_PASSWORD: ${{ secrets.PHARO_SIGN_PASSWORD }} |
| 94 | + PHARO_CERT_PASSWORD: ${{ secrets.PHARO_CERT_PASSWORD }} |
| 95 | + PHARO_SIGN_IDENTITY: ${{ secrets.PHARO_SIGN_IDENTITY }} |
| 96 | + NEWSPEAK_SIGN_PASSWORD: ${{ secrets.NEWSPEAK_SIGN_PASSWORD }} |
| 97 | + NEWSPEAK_CERT_PASSWORD: ${{ secrets.NEWSPEAK_CERT_PASSWORD }} |
| 98 | + NEWSPEAK_SIGN_IDENTITY: ${{ secrets.NEWSPEAK_SIGN_IDENTITY }} |
| 99 | + |
| 100 | + - name: Pack VM |
| 101 | + run: ./deploy/pack-vm.sh |
| 102 | + |
| 103 | + - name: Store artifact w/ revision |
| 104 | + uses: actions/upload-artifact@v2 |
| 105 | + with: |
| 106 | + name: ${{ env.ASSET_NAME }}_${{ env.ASSET_REVISION }} |
| 107 | + path: products/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} |
| 108 | + |
| 109 | + - name: Update artifact in latest-build |
| 110 | + |
| 111 | + if: github.event_name == 'push' && endsWith( github.ref , 'Cog' ) |
| 112 | + with: |
| 113 | + prerelease: true |
| 114 | + allowUpdates: true |
| 115 | + replacesArtifacts: true |
| 116 | + artifacts: products/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} |
| 117 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 118 | + tag: ${{ matrix.mode == 'debug' && 'latest-debug-build' || matrix.mode == 'assert' && 'latest-assert-build' || 'latest-build' }} |
| 119 | + body: ${{ github.event.head_commit.message }} |
| 120 | + |
| 121 | + - name: Deploy artifact as new release candidate |
| 122 | + |
| 123 | + if: github.event_name == 'workflow_dispatch' |
| 124 | + with: |
| 125 | + prerelease: true # release candidate |
| 126 | + allowUpdates: true |
| 127 | + replacesArtifacts: true |
| 128 | + artifacts: products/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} |
| 129 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 130 | + tag: ${{ github.event.inputs.tag }} |
| 131 | + body: ${{ github.event.head_commit.message }} |
0 commit comments