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