GHA: Sync main.yml with DMD repo's

This commit is contained in:
Martin Kinkelin 2024-03-02 03:39:45 +01:00 committed by Iain Buclaw
parent e3bc47d9df
commit a2ade9dec4

View file

@ -40,7 +40,7 @@ jobs:
OS_NAME: ${{ startsWith(matrix.os, 'ubuntu') && 'linux' || (startsWith(matrix.os, 'macos') && 'osx' || (startsWith(matrix.os, 'windows') && 'windows' || '')) }}
MODEL: ${{ matrix.model || '64' }}
HOST_DMD: dmd
N: ${{ startsWith(matrix.os, 'macos') && '3' || '4' }}
# N is set dynamically below
FULL_BUILD: false
# work around https://issues.dlang.org/show_bug.cgi?id=23517
MACOSX_DEPLOYMENT_TARGET: '11'
@ -71,6 +71,9 @@ jobs:
git clone --branch "$REPO_BRANCH" --depth 1 https://github.com/dlang/dmd.git ../dmd
- name: Set environment variable N (parallelism)
run: echo "N=$(${{ runner.os == 'macOS' && 'sysctl -n hw.logicalcpu' || 'nproc' }})" >> $GITHUB_ENV
- name: 'Posix: Install prerequisites'
if: runner.os != 'Windows'
run: cd ../dmd && ${{ runner.os == 'macOS' && 'ci/cirrusci.sh' || 'sudo -E ci/cirrusci.sh' }}
@ -80,6 +83,13 @@ jobs:
with:
arch: ${{ env.MODEL == '64' && 'x64' || 'x86' }}
# NOTE: Linker ICEs with Xcode 15.0.1 (default version on macos-13)
# * https://issues.dlang.org/show_bug.cgi?id=24407
# Remove this step if the default gets changed to 15.1 in actions/runner-images.
- name: 'macOS 13: Switch to Xcode v15.1'
if: matrix.os == 'macos-13'
run: sudo xcode-select -switch /Applications/Xcode_15.1.app
- name: 'Posix: Install host compiler'
if: runner.os != 'Windows'
run: cd ../dmd && ci/run.sh install_host_compiler
@ -127,6 +137,7 @@ jobs:
operating_system: freebsd
hypervisor: qemu
memory: 12G
cpu_count: 4
sync_files: runner-to-vm
version: ${{ matrix.freebsd_version }}
shell: bash
@ -139,7 +150,7 @@ jobs:
export OS_NAME=freebsd
export MODEL=64
export HOST_DMD=dmd
export N=3
export N="$(nproc)"
export FULL_BUILD=false
export CI_DFLAGS="-version=TARGET_FREEBSD${freebsd_major}"