Skip to content

Commit

Permalink
Merge pull request #609 from marceltaeumel/marceltaeumel/gha-macos-arm
Browse files Browse the repository at this point in the history
Adds builds for macos64ARMv8 to GHA
  • Loading branch information
marceltaeumel committed Dec 20, 2021
2 parents 27d2d9f + 7c761e7 commit 9ca20bd
Show file tree
Hide file tree
Showing 6 changed files with 151 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/extra-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
# - arch: linux32ARMv8
# flavor: squeak.cogmt.spur

runs-on: ubuntu-latest
runs-on: ubuntu-latest # we setup QEMU to produce binaries anyway
name: ${{ matrix.flavor }} for ${{ matrix.arch }}
env:
ARCH: ${{ matrix.arch }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- { name: win32x86, os: windows-latest }
- { name: linux64x64, os: ubuntu-18.04 }
- { name: linux32x86, os: ubuntu-18.04 }
- { name: macos64x64, os: macos-latest }
- { name: macos64x64, os: macos-10.15 }
# - { name: macos32x86, os: macos-latest }

flavor:
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:

# - arch: { name: macos64x64, os: macos-latest }
# flavor: pharo.cog.spur.lowcode # impl. decl. getThisSessionID
- arch: { name: macos64x64, os: macos-latest }
- arch: { name: macos64x64, os: macos-10.15 }
flavor: pharo.stack.spur.lowcode

runs-on: ${{ matrix.arch.os }}
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/linux-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ on:
- 'scripts/ci/*build.sh'
- 'deploy/**'
# Relevant sources for this platform
- 'building/linux*/**' # Makefile-based build scripts
- 'building/linux*ARM*/**' # Makefile-based build scripts
- 'building/linux32/**' # Makefile-based build scripts
- 'building/linux64/**' # Makefile-based build scripts
- '*src/**' # Generated VMMaker sources (incl. plugins)
- 'platforms/Cross/**'
- 'platforms/unix/**'
Expand All @@ -26,7 +28,9 @@ on:
- 'scripts/ci/*build.sh'
- 'deploy/**'
# Relevant sources for this platform
- 'building/linux*/**' # Makefile-based build scripts
- 'building/linux*ARM*/**' # Makefile-based build scripts
- 'building/linux32/**' # Makefile-based build scripts
- 'building/linux64/**' # Makefile-based build scripts
- '*src/**' # Generated VMMaker sources (incl. plugins)
- 'platforms/Cross/**'
- 'platforms/unix/**'
Expand Down Expand Up @@ -57,7 +61,7 @@ jobs:
- debug
- assert

runs-on: ubuntu-latest
runs-on: ubuntu-latest # we setup QEMU to produce binaries anyway
name: ${{ matrix.flavor }} for ${{ matrix.arch }}${{ matrix.mode == 'debug' && ' (DEBUG)' || matrix.mode == 'assert' && ' (ASSERT)' || '' }}
env:
ARCH: ${{ matrix.arch }}
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ on:
- 'scripts/ci/*build.sh'
- 'deploy/**'
# Relevant sources for this platform
- 'building/linux*/**' # Makefile-based build scripts
- 'building/linux*x*/**' # Makefile-based build scripts
- 'building/linux32/**' # Makefile-based build scripts
- 'building/linux64/**' # Makefile-based build scripts
- '*src/**' # Generated VMMaker sources (incl. plugins)
- 'platforms/Cross/**'
- 'platforms/unix/**'
Expand All @@ -26,7 +28,9 @@ on:
- 'scripts/ci/*build.sh'
- 'deploy/**'
# Relevant sources for this platform
- 'building/linux*/**' # Makefile-based build scripts
- 'building/linux*x*/**' # Makefile-based build scripts
- 'building/linux32/**' # Makefile-based build scripts
- 'building/linux64/**' # Makefile-based build scripts
- '*src/**' # Generated VMMaker sources (incl. plugins)
- 'platforms/Cross/**'
- 'platforms/unix/**'
Expand Down Expand Up @@ -79,7 +83,7 @@ jobs:
heartbeat: threaded
mode: fast

runs-on: ubuntu-18.04
runs-on: ubuntu-18.04 # better backwards compatibility than ubuntu-20.04
name: ${{ matrix.flavor }}${{ matrix.heartbeat == 'itimer' && ' (itimer)' || '' }} for ${{ matrix.arch }}${{ matrix.mode == 'debug' && ' (DEBUG)' || matrix.mode == 'assert' && ' (ASSERT)' || '' }}
env:
ARCH: ${{ matrix.arch }}
Expand Down
131 changes: 131 additions & 0 deletions .github/workflows/macos-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: Build for macOS (ARM)

on:
push: # All branches, but appropriate paths only.
paths:
# This workflow spec and its support scripts
- '.github/workflows/macos.yml'
- 'scripts/ci/*build.sh'
- 'deploy/**'
# Relevant sources for this platform
- 'building/macos*ARM*/**' # Makefile-based build scripts
- '*src/**' # Generated VMMaker sources (incl. plugins)
- 'platforms/Cross/**'
- 'platforms/iOS/**' # Note that 'platforms/Mac OS' is deprecated
# Skip changes in documentation artifacts
- '!**.md'
- '!**HowToBuild'
pull_request:
branches:
- Cog
paths:
# This workflow spec and its support scripts
- '.github/workflows/macos.yml'
- 'scripts/ci/*build.sh'
- 'deploy/**'
# Relevant sources for this platform
- 'building/macos*ARM*/**' # Makefile-based build scripts
- '*src/**' # Generated VMMaker sources (incl. plugins)
- 'platforms/Cross/**'
- 'platforms/iOS/**' # Note that 'platforms/Mac OS' is deprecated
# Skip changes in documentation artifacts
- '!**.md'
- '!**HowToBuild'
workflow_dispatch:
inputs:
tag:
description: "Build new release candidate for tag"
required: true
default: YYYYMMDDHHMM

jobs:
build:
strategy:
fail-fast: true
matrix:
arch:
- macos64ARMv8
flavor:
- squeak.cog.spur
# - squeak.sista.spur # -Werror bc. decl. missing
- squeak.stack.spur
# - pharo.cog.spur
# - pharo.sista.spur # -Werror bc. decl. missing
# - pharo.stack.spur
mode:
- fast
- debug
- assert

runs-on: macos-10.15 # macos-11 macos-latest
name: ${{ matrix.flavor }} for ${{ matrix.arch }}${{ matrix.mode == 'debug' && ' (DEBUG)' || matrix.mode == 'assert' && ' (ASSERT)' || '' }}
env:
ARCH: ${{ matrix.arch }}
FLAVOR: ${{ matrix.flavor }}
MODE: ${{ matrix.mode }}
steps:
- name: Checkout files
if: github.event_name != 'workflow_dispatch'
uses: actions/checkout@v2

- name: Checkout files for new release candidate
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v2
with:
ref: refs/tags/${{ github.event.inputs.tag }}

- name: Restore build cache
uses: actions/cache@v2
with:
path: .thirdparty-cache
key: thirdparty-cache-macos

- name: Build VM
run: ./scripts/ci/actions_build.sh

- name: Sign VM
continue-on-error: true # Save unsigned build artifacts
run: ./deploy/sign-vm.sh
env:
SQUEAK_SIGN_PASSWORD: ${{ secrets.SQUEAK_SIGN_PASSWORD }}
SQUEAK_CERT_PASSWORD: ${{ secrets.SQUEAK_CERT_PASSWORD }}
SQUEAK_SIGN_IDENTITY: ${{ secrets.SQUEAK_SIGN_IDENTITY }}
PHARO_SIGN_PASSWORD: ${{ secrets.PHARO_SIGN_PASSWORD }}
PHARO_CERT_PASSWORD: ${{ secrets.PHARO_CERT_PASSWORD }}
PHARO_SIGN_IDENTITY: ${{ secrets.PHARO_SIGN_IDENTITY }}
NEWSPEAK_SIGN_PASSWORD: ${{ secrets.NEWSPEAK_SIGN_PASSWORD }}
NEWSPEAK_CERT_PASSWORD: ${{ secrets.NEWSPEAK_CERT_PASSWORD }}
NEWSPEAK_SIGN_IDENTITY: ${{ secrets.NEWSPEAK_SIGN_IDENTITY }}

- name: Pack VM
run: ./deploy/pack-vm.sh

- name: Store artifact w/ revision
uses: actions/upload-artifact@v2
with:
name: ${{ env.ASSET_NAME }}_${{ env.ASSET_REVISION }}
path: products/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }}

- name: Update artifact in latest-build
uses: ncipollo/release-action@v1.8.6
if: github.event_name == 'push' && endsWith( github.ref , 'Cog' )
with:
prerelease: true
allowUpdates: true
replacesArtifacts: true
artifacts: products/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }}
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ matrix.mode == 'debug' && 'latest-debug-build' || matrix.mode == 'assert' && 'latest-assert-build' || 'latest-build' }}
body: ${{ github.event.head_commit.message }}

- name: Deploy artifact as new release candidate
uses: ncipollo/release-action@v1.8.6
if: github.event_name == 'workflow_dispatch'
with:
prerelease: true # release candidate
allowUpdates: true
replacesArtifacts: true
artifacts: products/${{ env.ASSET_NAME }}.${{ env.ASSET_EXTENSION }}
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.inputs.tag }}
body: ${{ github.event.head_commit.message }}
6 changes: 3 additions & 3 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- 'scripts/ci/*build.sh'
- 'deploy/**'
# Relevant sources for this platform
- 'building/macos*/**' # Makefile-based build scripts
- 'building/macos*x*/**' # Makefile-based build scripts
- '*src/**' # Generated VMMaker sources (incl. plugins)
- 'platforms/Cross/**'
- 'platforms/iOS/**' # Note that 'platforms/Mac OS' is deprecated
Expand All @@ -24,7 +24,7 @@ on:
- 'scripts/ci/*build.sh'
- 'deploy/**'
# Relevant sources for this platform
- 'building/macos*/**' # Makefile-based build scripts
- 'building/macos*x*/**' # Makefile-based build scripts
- '*src/**' # Generated VMMaker sources (incl. plugins)
- 'platforms/Cross/**'
- 'platforms/iOS/**' # Note that 'platforms/Mac OS' is deprecated
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
- debug
- assert

runs-on: macos-latest
runs-on: macos-10.15 # macos-11 macos-latest
name: ${{ matrix.flavor }} for ${{ matrix.arch }}${{ matrix.mode == 'debug' && ' (DEBUG)' || matrix.mode == 'assert' && ' (ASSERT)' || '' }}
env:
ARCH: ${{ matrix.arch }}
Expand Down

0 comments on commit 9ca20bd

Please sign in to comment.