Fix Workflow #3
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| paths-ignore: ['**/*.md'] | |
| pull_request: | |
| paths-ignore: ['**/*.md'] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| dc: [dmd-latest, ldc-latest] | |
| exclude: | |
| # DMD only emits x86_64 binaries, which cannot link against the arm64 | |
| # build of the WebUI C library used on Apple Silicon runners. | |
| - os: macos-latest | |
| dc: dmd-latest | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dlang-community/setup-dlang@v2 | |
| with: | |
| compiler: ${{ matrix.dc }} | |
| - name: Run unit tests | |
| run: dub test --compiler=$DC | |
| - name: Build examples | |
| run: | | |
| exit_code=0 | |
| for path in examples/*/; do | |
| name=$(basename "$path") | |
| echo "Building example '$name'" | |
| if ! dub build ":$name" --compiler=$DC; then | |
| exit_code=1 | |
| fi | |
| done | |
| exit $exit_code |