4040 OS_NAME : ${{ startsWith(matrix.os, 'ubuntu') && 'linux' || (startsWith(matrix.os, 'macos') && 'osx' || (startsWith(matrix.os, 'windows') && 'windows' || '')) }}
4141 MODEL : ${{ matrix.model || '64' }}
4242 HOST_DMD : dmd
43- N : ${{ startsWith(matrix.os, 'macos') && '3' || '4' }}
43+ # N is set dynamically below
4444 FULL_BUILD : false
4545 # work around https://issues.dlang.org/show_bug.cgi?id=23517
4646 MACOSX_DEPLOYMENT_TARGET : ' 11'
7171
7272 git clone --branch "$REPO_BRANCH" --depth 1 https://github.com/dlang/dmd.git ../dmd
7373
74+ - name : Set environment variable N (parallelism)
75+ run : echo "N=$(${{ runner.os == 'macOS' && 'sysctl -n hw.logicalcpu' || 'nproc' }})" >> $GITHUB_ENV
76+
7477 - name : ' Posix: Install prerequisites'
7578 if : runner.os != 'Windows'
7679 run : cd ../dmd && ${{ runner.os == 'macOS' && 'ci/cirrusci.sh' || 'sudo -E ci/cirrusci.sh' }}
8083 with :
8184 arch : ${{ env.MODEL == '64' && 'x64' || 'x86' }}
8285
86+ # NOTE: Linker ICEs with Xcode 15.0.1 (default version on macos-13)
87+ # * https://issues.dlang.org/show_bug.cgi?id=24407
88+ # Remove this step if the default gets changed to 15.1 in actions/runner-images.
89+ - name : ' macOS 13: Switch to Xcode v15.1'
90+ if : matrix.os == 'macos-13'
91+ run : sudo xcode-select -switch /Applications/Xcode_15.1.app
92+
8393 - name : ' Posix: Install host compiler'
8494 if : runner.os != 'Windows'
8595 run : cd ../dmd && ci/run.sh install_host_compiler
@@ -127,6 +137,7 @@ jobs:
127137 operating_system : freebsd
128138 hypervisor : qemu
129139 memory : 12G
140+ cpu_count : 4
130141 sync_files : runner-to-vm
131142 version : ${{ matrix.freebsd_version }}
132143 shell : bash
@@ -139,7 +150,7 @@ jobs:
139150 export OS_NAME=freebsd
140151 export MODEL=64
141152 export HOST_DMD=dmd
142- export N=3
153+ export N="$(nproc)"
143154 export FULL_BUILD=false
144155 export CI_DFLAGS="-version=TARGET_FREEBSD${freebsd_major}"
145156
0 commit comments