From 3b0ae22d3dd801c80e85ee82c88e22a4eeab0306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Heusipp?= Date: Thu, 7 Mar 2024 08:13:27 +0000 Subject: [PATCH] [Imp] build: CI: GitHub: macOS: Use a big matrix build with explicit host system, Xcode version, architecture, and deployment target. git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@20260 56274372-70c3-4bfc-bfc3-4c3a0b034d27 --- .github/workflows/macOS-12-Makefile.yml | 31 -------------- .github/workflows/macOS-13-Makefile.yml | 29 ------------- .github/workflows/macOS-14-Makefile.yml | 27 ------------ .github/workflows/macOS-Makefile.yml | 57 +++++++++++++++++++++++++ 4 files changed, 57 insertions(+), 87 deletions(-) delete mode 100644 .github/workflows/macOS-12-Makefile.yml delete mode 100644 .github/workflows/macOS-13-Makefile.yml delete mode 100644 .github/workflows/macOS-14-Makefile.yml create mode 100644 .github/workflows/macOS-Makefile.yml diff --git a/.github/workflows/macOS-12-Makefile.yml b/.github/workflows/macOS-12-Makefile.yml deleted file mode 100644 index d18a52311f6..00000000000 --- a/.github/workflows/macOS-12-Makefile.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: macOS 12 Makefile - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }} - cancel-in-progress: true - -jobs: - build: - - runs-on: macos-12 - - steps: - - uses: actions/checkout@v4 - - name: fixup GitHub Homebrew node breakage - run: brew unlink node@18 && brew unlink node && brew link --overwrite node - - name: fixup GitHub Homebrew python breakage - run: brew unlink python@3.11 && brew unlink python@3.12 && brew link --overwrite python@3.11 && brew link --overwrite python@3.12 - - name: install dependencies - run: brew update && brew upgrade && brew install p7zip help2man doxygen autoconf-archive mpg123 libogg libvorbis portaudio flac libsndfile sdl2 - - name: setup parallel make - run: echo "MAKEFLAGS=-j$(sysctl -n hw.ncpu)" >> $GITHUB_ENV - - name: make - run: make STRICT=1 FORCE_DEPS=1 - - name: make check - run: make STRICT=1 FORCE_DEPS=1 check diff --git a/.github/workflows/macOS-13-Makefile.yml b/.github/workflows/macOS-13-Makefile.yml deleted file mode 100644 index e81ef64f14b..00000000000 --- a/.github/workflows/macOS-13-Makefile.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: macOS 13 Makefile - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }} - cancel-in-progress: true - -jobs: - build: - - runs-on: macos-13 - - steps: - - uses: actions/checkout@v4 - - name: fixup GitHub Homebrew python breakage - run: brew unlink python@3.11 && brew unlink python@3.12 && brew link --overwrite python@3.11 && brew link --overwrite python@3.12 - - name: install dependencies - run: brew update && brew upgrade && brew install p7zip help2man doxygen autoconf-archive mpg123 libogg libvorbis portaudio flac libsndfile sdl2 - - name: setup parallel make - run: echo "MAKEFLAGS=-j$(sysctl -n hw.ncpu)" >> $GITHUB_ENV - - name: make - run: make STRICT=1 FORCE_DEPS=1 - - name: make check - run: make STRICT=1 FORCE_DEPS=1 check diff --git a/.github/workflows/macOS-14-Makefile.yml b/.github/workflows/macOS-14-Makefile.yml deleted file mode 100644 index 1f09722900d..00000000000 --- a/.github/workflows/macOS-14-Makefile.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: macOS 14 Makefile - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -concurrency: - group: ${{ github.ref }}-${{ github.workflow }} - cancel-in-progress: true - -jobs: - build: - - runs-on: macos-14 - - steps: - - uses: actions/checkout@v4 - - name: install dependencies - run: brew update && brew upgrade && brew install p7zip help2man doxygen autoconf-archive mpg123 libogg libvorbis portaudio flac libsndfile sdl2 - - name: setup parallel make - run: echo "MAKEFLAGS=-j$(sysctl -n hw.ncpu)" >> $GITHUB_ENV - - name: make - run: make STRICT=1 FORCE_DEPS=1 - - name: make check - run: make STRICT=1 FORCE_DEPS=1 check diff --git a/.github/workflows/macOS-Makefile.yml b/.github/workflows/macOS-Makefile.yml new file mode 100644 index 00000000000..f9e666261c2 --- /dev/null +++ b/.github/workflows/macOS-Makefile.yml @@ -0,0 +1,57 @@ + +name: macOS Makefile + +on: + push: + branches: [ macos-action-test ] + pull_request: + branches: [ macos-action-test ] + +jobs: + build: + strategy: + matrix: + include: + - { host: macos-14, compiler: 15.2, arch: '' , target: '' , deps: true, check: true } + - { host: macos-14, compiler: 15.2, arch: arm64 , target: '' , deps: false, check: true } + - { host: macos-14, compiler: 15.2, arch: x64_64, target: '' , deps: false, check: true } + - { host: macos-14, compiler: 15.2, arch: arm64 , target: 14 , deps: false, check: true } + - { host: macos-14, compiler: 15.2, arch: x64_64, target: 14 , deps: false, check: true } + - { host: macos-14, compiler: 15.2, arch: arm64 , target: 13 , deps: false, check: true } + - { host: macos-14, compiler: 15.2, arch: x64_64, target: 13 , deps: false, check: true } + - { host: macos-14, compiler: 15.2, arch: arm64 , target: 12 , deps: false, check: true } + - { host: macos-14, compiler: 15.2, arch: x64_64, target: 12 , deps: false, check: true } + - { host: macos-14, compiler: 15.2, arch: arm64 , target: 11 , deps: false, check: true } + - { host: macos-14, compiler: 15.2, arch: x64_64, target: 11 , deps: false, check: true } + - { host: macos-14, compiler: 15.2, arch: x64_64, target: 10.15, deps: false, check: true } + - { host: macos-14, compiler: 15.2, arch: x64_64, target: 10.14, deps: false, check: true } + - { host: macos-14, compiler: 15.2, arch: i386 , target: 10.14, deps: false, check: false } + - { host: macos-14, compiler: 15.2, arch: x64_64, target: 10.13, deps: false, check: true } + - { host: macos-14, compiler: 15.2, arch: i386 , target: 10.13, deps: false, check: false } + - { host: macos-13, compiler: 15.2, arch: x64_64, target: 10.13, deps: false, check: true } + - { host: macos-13, compiler: 15.2, arch: i386 , target: 10.13, deps: false, check: false } + - { host: macos-12, compiler: 14.2, arch: x64_64, target: 10.13, deps: false, check: true } + - { host: macos-12, compiler: 14.2, arch: i386 , target: 10.13, deps: false, check: false } + concurrency: + group: ${{github.ref}}-${{github.workflow}}-${{matrix.host}}-${{matrix.compiler}}-${{matrix.arch}}-${{matrix.target}} + cancel-in-progress: true + runs-on: ${{matrix.host}} + steps: + - uses: actions/checkout@v4 + - name: fixup GitHub Homebrew node breakage + if: ${{ matrix.host == 'macos-12' }} + run: brew unlink node@18 && brew unlink node && brew link --overwrite node + - name: fixup GitHub Homebrew python breakage + if: ${{ matrix.host == 'macos-12' || matrix.host == 'macos-13' }} + run: brew unlink python@3.11 && brew unlink python@3.12 && brew link --overwrite python@3.11 && brew link --overwrite python@3.12 + - name: install dependencies + run: brew update && brew upgrade && brew install p7zip help2man doxygen autoconf-archive mpg123 libogg libvorbis portaudio flac libsndfile sdl2 + - name: selecting Xcode version + run: sudo xcode-select --switch /Applications/Xcode_${{matrix.compiler}}.app + - name: setup parallel make + run: echo "MAKEFLAGS=-j$(sysctl -n hw.ncpu)" >> $GITHUB_ENV + - name: make + run: make ${{ matrix.arch == '' && '' || join('ARCH=',matrix.arch) }} ${{ matrix.target == '' && '' || join('MACOSX_VERSION_MIN=',matrix.target) }} STRICT=1 ${{ matrix.deps && 'FORCE_DEPS=1' || 'LOCAL_ZLIB=1 LOCAL_MPG123=1 LOCAL_OGG=1 LOCAL_VORBIS=1 NO_PORTAUDIO=1 NO_PORTAUDIOCPP=1 NO_PULSEAUDIO=1 NO_SDL2=1 NO_FLAC=1 NO_SNDFILE=1' }} + - name: make check + if: ${{ matrix.check }} + run: make ${{ matrix.arch == '' && '' || join('ARCH=',matrix.arch) }} ${{ matrix.target == '' && '' || join('MACOSX_VERSION_MIN=',matrix.target) }} STRICT=1 ${{ matrix.deps && 'FORCE_DEPS=1' || 'LOCAL_ZLIB=1 LOCAL_MPG123=1 LOCAL_OGG=1 LOCAL_VORBIS=1 NO_PORTAUDIO=1 NO_PORTAUDIOCPP=1 NO_PULSEAUDIO=1 NO_SDL2=1 NO_FLAC=1 NO_SNDFILE=1' }} check