|
| 1 | +name: Extra Monthly Builds (ARM) |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: '0 0 1 * *' # Build on the 1st of every month at midnight |
| 6 | + workflow_dispatch: |
| 7 | + inputs: |
| 8 | + should-deploy: |
| 9 | + description: 'Deploy on success' |
| 10 | + required: true |
| 11 | + default: "true" # No boolean support at the moment |
| 12 | + |
| 13 | +# !! NOTICE !! |
| 14 | +# This workflow spec is basically a copy of linux-arm.yml. It includes |
| 15 | +# aspects of extra.yml for the manual workflow dispatch. Please update |
| 16 | +# this file according to its original files. |
| 17 | + |
| 18 | +jobs: |
| 19 | + build: |
| 20 | + strategy: |
| 21 | + fail-fast: false # let them finish bc. mixed platforms |
| 22 | + matrix: |
| 23 | + include: |
| 24 | + # Only Newspeak is configured for ARMv7 |
| 25 | + - arch: linux32ARMv7 |
| 26 | + flavor: newspeak.cog.spur |
| 27 | + - arch: linux32ARMv7 |
| 28 | + flavor: newspeak.stack.spur |
| 29 | + # Some other flavors for backwards compatibility |
| 30 | + - arch: linux32ARMv6 |
| 31 | + flavor: pharo.cog.spur |
| 32 | + - arch: linux32ARMv6 |
| 33 | + flavor: squeak.cog.v3 |
| 34 | + - arch: linux32ARMv6 |
| 35 | + flavor: squeak.stack.v3 |
| 36 | + # CogMT not ready yet |
| 37 | + # - arch: linux32ARMv8 |
| 38 | + # flavor: squeak.cogmt.spur |
| 39 | + |
| 40 | + runs-on: ubuntu-latest |
| 41 | + name: ${{ matrix.flavor }} for ${{ matrix.arch }} |
| 42 | + env: |
| 43 | + ARCH: ${{ matrix.arch }} |
| 44 | + ARCH_ARM: ${{ matrix.arch == 'linux32ARMv6' && 'armv6' || matrix.arch == 'linux32ARMv7' && 'armv7' || 'aarch64' }} |
| 45 | + FLAVOR: ${{ matrix.flavor }} |
| 46 | + MODE: fast # no assert or debug here |
| 47 | + HEARTBEAT: threaded # itimer not supported |
| 48 | + steps: |
| 49 | + - name: Checkout files |
| 50 | + uses: actions/checkout@v2 |
| 51 | + |
| 52 | + # TODO: Can we use the same thirdparty cache for armv6, armv7, and aarch64? Are pre-compiled binaries compatible or organized differently? |
| 53 | + - name: Restore build cache |
| 54 | + uses: actions/cache@v2 |
| 55 | + with: |
| 56 | + path: .thirdparty-cache |
| 57 | + key: thirdparty-cache-linux-${{ env.ARCH_ARM }} |
| 58 | + |
| 59 | + # https://github.com/marketplace/actions/run-on-architecture |
| 60 | + - name: Build VM |
| 61 | + uses: uraimo/run-on-arch-action@v2.1.1 |
| 62 | + id: build-vm |
| 63 | + with: |
| 64 | + arch: ${{ env.ARCH_ARM }} |
| 65 | + distro: buster |
| 66 | + |
| 67 | + #TODO: Somehow use ./scripts/ci/actions_prepare_linux_arm.sh |
| 68 | + #SEE: https://github.com/uraimo/run-on-arch-action/issues/54 |
| 69 | + install: | |
| 70 | + apt update -y |
| 71 | + apt install -yq --no-install-suggests --no-install-recommends build-essential git devscripts uuid-dev libcairo2-dev libpango1.0-dev libgl1-mesa-dev libgl1-mesa-glx libssl-dev libevdev-dev m4 libpulse-dev libasound2-dev libfreetype6-dev libx11-dev libxrender-dev libtool automake autoconf libltdl-dev |
| 72 | +
|
| 73 | + env: | # Copy the entire environment for the docker container |
| 74 | + ARCH: ${{ env.ARCH }} |
| 75 | + ARCH_ARM: ${{ env.ARCH_ARM }} |
| 76 | + FLAVOR: ${{ env.FLAVOR }} |
| 77 | + MODE: ${{ env.MODE }} |
| 78 | + HEARTBEAT: ${{ env.HEARTBEAT }} |
| 79 | +
|
| 80 | + run: ./scripts/ci/actions_build.sh |
| 81 | + |
| 82 | + - name: Post Build VM |
| 83 | + #TODO: https://github.com/uraimo/run-on-arch-action/issues/52 |
| 84 | + run: | |
| 85 | + sudo chown -R runner ${{ steps.build-vm.outputs.PRODUCTS_PATH }} |
| 86 | + echo "ASSET_REVISION=${{ steps.build-vm.outputs.ASSET_REVISION }}" >> $GITHUB_ENV |
| 87 | + echo "ASSET_NAME=${{ steps.build-vm.outputs.ASSET_NAME }}" >> $GITHUB_ENV |
| 88 | + echo "PRODUCTS_PATH=${{ steps.build-vm.outputs.PRODUCTS_PATH }}" >> $GITHUB_ENV |
| 89 | + echo "APP_NAME=${{ steps.build-vm.outputs.APP_NAME }}" >> $GITHUB_ENV |
| 90 | +
|
| 91 | + - name: Sign VM (not implemented) |
| 92 | + if: false |
| 93 | + run: ./deploy/sign-vm.sh |
| 94 | + |
| 95 | + - name: Pack VM |
| 96 | + run: ./deploy/pack-vm.sh |
| 97 | + |
| 98 | + - name: Store artifact w/ revision |
| 99 | + uses: actions/upload-artifact@v2 |
| 100 | + with: |
| 101 | + name: ${{ env.ASSET_NAME }}_${{ env.ASSET_REVISION }} |
| 102 | + path: ${{ env.PRODUCTS_PATH }}/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} |
| 103 | + |
| 104 | + - name: Update artifact in latest-release |
| 105 | + uses: ncipollo/release-action@v1.8.6 |
| 106 | + if: github.event_name == 'push' && endsWith( github.ref , 'Cog' ) |
| 107 | + with: |
| 108 | + prerelease: true |
| 109 | + allowUpdates: true |
| 110 | + replacesArtifacts: true |
| 111 | + artifacts: ${{ env.PRODUCTS_PATH }}/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }} |
| 112 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 113 | + tag: ${{ matrix.mode == 'debug' && 'latest-debug-build' || matrix.mode == 'assert' && 'latest-assert-build' || 'latest-build' }} |
| 114 | + body: ${{ github.event.head_commit.message }} |
0 commit comments