From ac05ac2ff8c061dc6f8ebe7c61cf82082442caff Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 15 Dec 2025 19:16:38 -0800 Subject: [PATCH] ci: ensure demos are built --- .github/workflows/build.yml | 47 +++++++++++++++++++++++++++++++++++++ .github/workflows/dmd.yml | 32 ------------------------- .github/workflows/ldc.yml | 32 ------------------------- 3 files changed, 47 insertions(+), 64 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/dmd.yml delete mode 100644 .github/workflows/ldc.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..14e22b7 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,47 @@ +name: build and test + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +permissions: + contents: read + +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + dc: [dmd-latest, ldc-latest] + exclude: + - os: macos-latest + dc: dmd-latest + - os: windows-latest + dc: ldc-latest + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout Source + uses: actions/checkout@v6 + + - name: D Compiler Installation + uses: dlang-community/setup-dlang@v2 + with: + compiler: ${{ matrix.dc }} + + - name: Build and Test + run: | + dub -q test + + - name: Build Demos + shell: bash + run: | + for demo in clipboard colors hello mouse styles; + do + cd demos/$demo + dub build || exit 1 + cd ../.. + done diff --git a/.github/workflows/dmd.yml b/.github/workflows/dmd.yml deleted file mode 100644 index 08c511d..0000000 --- a/.github/workflows/dmd.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: dmd - -on: - push: - branches: ["main"] - pull_request: - branches: ["main"] - -permissions: - contents: read - -jobs: - build: - strategy: - matrix: - os: [ubuntu-latest, windows-latest] - dc: [dmd-latest] - - runs-on: ${{ matrix.os }} - - steps: - - name: Checkout Source - uses: actions/checkout@v6 - - - name: D Compiler Installation - uses: dlang-community/setup-dlang@v2 - with: - compiler: ${{ matrix.dc }} - - - name: Build and Test - run: | - dub -q test diff --git a/.github/workflows/ldc.yml b/.github/workflows/ldc.yml deleted file mode 100644 index ffecd39..0000000 --- a/.github/workflows/ldc.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: ldc - -on: - push: - branches: ["main"] - pull_request: - branches: ["main"] - -permissions: - contents: read - -jobs: - build: - strategy: - matrix: - os: [ubuntu-latest, macos-latest] - dc: [ldc-latest] - - runs-on: ${{ matrix.os }} - - steps: - - name: Checkout Source - uses: actions/checkout@v6 - - - name: D Compiler Installation - uses: dlang-community/setup-dlang@v2 - with: - compiler: ${{ matrix.dc }} - - - name: Build and Test - run: | - dub -q test