Merge Makefiles and add GitHub Actions CI (replacing AppVeyor) #30
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Main | |
on: | |
- pull_request # without merge conflicts | |
- push # branch or tag | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
main: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ macos-latest, ubuntu-latest, windows-latest ] | |
dc: [ dmd-latest, ldc-latest ] | |
name: ${{ matrix.os }}, ${{ matrix.dc }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 10 | |
env: | |
DMD: ${{ startsWith(matrix.dc, 'ldc') && 'ldmd2' || 'dmd' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install D compiler | |
uses: dlang-community/[email protected] | |
with: | |
compiler: ${{ matrix.dc }} | |
- name: Build | |
shell: bash | |
run: make -j3 DMD=$DMD | |
- name: Test | |
shell: bash | |
# /tmp is a symlink on Mac, and rdmd_test.d doesn't like it | |
run: ${{ runner.os == 'macOS' && 'TMPDIR=$(cd /tmp && pwd -P)' || '' }} make -j3 DMD=$DMD test | |
- name: 'Windows: Build and test with MODEL=32' | |
if: runner.os == 'Windows' | |
shell: bash | |
run: make -j3 DMD=$DMD MODEL=32 all test |