Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ jobs:
os: ubuntu-latest
container_image: alpine:3.21
host_dmd: ldmd2
timeout_minutes: 60 # Alpine/musl currently pushes `test_phobos` beyond the 40 minute default budget
# macOS
- job_name: macOS x64
os: macos-14
timeout-minutes: 60
timeout_minutes: 120 # macOS generally takes more time than Linux/Alpine
Comment thread
morningstarxcdcode marked this conversation as resolved.
# Windows
- job_name: Windows x64
os: windows-2022
Expand All @@ -38,7 +39,7 @@ jobs:
name: ${{ matrix.job_name }}
runs-on: ${{ matrix.os }}
container: ${{ matrix.container_image }}
timeout-minutes: ${{ matrix.timeout-minutes || 40 }}
timeout-minutes: ${{ matrix.timeout_minutes || 40 }}
Comment thread
morningstarxcdcode marked this conversation as resolved.
env:
# for ci/run.sh:
OS_NAME: ${{ startsWith(matrix.os, 'ubuntu') && 'linux' || (startsWith(matrix.os, 'macos') && 'osx' || (startsWith(matrix.os, 'windows') && 'windows' || '')) }}
Expand All @@ -61,7 +62,7 @@ jobs:
fetch-depth: 50
- name: Clone DMD
run: |
set -uexo pipefail
set -uxo pipefail

ref='${{ github.ref }}'
if [[ "$ref" =~ ^refs/pull/ ]]; then
Expand All @@ -77,7 +78,13 @@ jobs:
exit 1
fi

git clone --branch "$REPO_BRANCH" --depth 1 https://github.com/dlang/dmd.git ../dmd
# Clone DMD: try the specific branch, fall back to master if it doesn't exist
if git clone --branch "$REPO_BRANCH" --depth 1 https://github.com/dlang/dmd.git ../dmd 2>/dev/null; then
echo "Cloned dlang/dmd branch: $REPO_BRANCH"
else
echo "Branch '$REPO_BRANCH' not found; cloning master instead"
git clone --branch master --depth 1 https://github.com/dlang/dmd.git ../dmd
fi
Comment thread
morningstarxcdcode marked this conversation as resolved.

- name: Set environment variable N (parallelism)
run: echo "N=$(${{ runner.os == 'macOS' && 'sysctl -n hw.logicalcpu' || 'nproc' }})" >> $GITHUB_ENV
Expand Down Expand Up @@ -177,7 +184,13 @@ jobs:
exit 1
fi

git clone --branch "$REPO_BRANCH" --depth 1 https://github.com/dlang/dmd.git ../dmd
# Clone DMD: try requested branch, fall back to master if missing
if git clone --branch "$REPO_BRANCH" --depth 1 https://github.com/dlang/dmd.git ../dmd 2>/dev/null; then
echo "Cloned dlang/dmd branch: $REPO_BRANCH"
else
echo "Branch '$REPO_BRANCH' not found; cloning master instead"
git clone --branch master --depth 1 https://github.com/dlang/dmd.git ../dmd
fi
Comment thread
morningstarxcdcode marked this conversation as resolved.
echo '::endgroup::'

cd ../dmd
Expand Down
Loading