From 9bc8a6b408185de53f5075f77006d2de1e7043c1 Mon Sep 17 00:00:00 2001 From: singingbush Date: Wed, 13 Dec 2023 13:15:20 +0000 Subject: [PATCH] update GitHub workflows (also add GDC builds) --- .github/workflows/docs.yml | 2 +- .github/workflows/dub.yml | 49 ++++++++++++++++++++++- .github/workflows/integration-testing.yml | 6 +-- 3 files changed, 51 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2c67789..df5d125 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: persist-credentials: false diff --git a/.github/workflows/dub.yml b/.github/workflows/dub.yml index c089132..e7b52c0 100644 --- a/.github/workflows/dub.yml +++ b/.github/workflows/dub.yml @@ -26,12 +26,20 @@ jobs: compiler: - dmd-latest - ldc-latest + - dmd-2.105.3 # (released in 2023) + - dmd-2.104.2 # (released in 2023) + - dmd-2.103.1 # (released in 2023) + - dmd-2.102.2 # (released in 2023) - dmd-2.101.2 - dmd-2.098.1 + + - ldc-1.35.0 # eq to dmd v2.105.2 + - ldc-1.34.0 # eq to dmd v2.104.2 + - ldc-1.33.0 # eq to dmd v2.103.1 - ldc-1.31.0 # eq to dmd v2.101.2 - ldc-1.28.1 # eq to dmd v2.098.1 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install D ${{ matrix.compiler }} uses: dlang-community/setup-dlang@v1 @@ -85,7 +93,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install D ${{ matrix.compiler }} uses: dlang-community/setup-dlang@v1 @@ -101,3 +109,40 @@ jobs: # cache - uses: WebFreak001/dub-upgrade@v0.1.1 with: { store: true } + + ## On Ubuntu we can use GDC. The compatibility of gdc is: + ## gcc gdc-10 -> D 2.076 (the default on Ubuntu 20.04 (ubuntu-latest), also available on 22.04) + ## gcc gdc-11 -> D 2.076 (requires Ubuntu 22.04) + ## gcc gdc-12 -> D 2.100 (requires Ubuntu 22.04) + ## gcc gdc-13 -> D 2.103 (requires Ubuntu 23.04 - no runners yet) + gdc: + name: ${{ matrix.compiler }} on ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-22.04 ] + compiler: [ gdc-10, gdc-11, gdc-12 ] + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + + - name: Install DMD (so dub is available) + uses: dlang-community/setup-dlang@v1 + with: + compiler: dmd-latest + + - name: Install ${{ matrix.compiler }} + run: | + sudo apt update + sudo apt install ${{ matrix.compiler }} -y + + - name: Show version + run: | + ${{ matrix.compiler }} --version + dub --version + + - name: Build Library (Release) + env: + DC: ${{ matrix.compiler }} + run: dub build --compiler=${{ matrix.compiler }} --build=release diff --git a/.github/workflows/integration-testing.yml b/.github/workflows/integration-testing.yml index 4a771c2..25a3b89 100644 --- a/.github/workflows/integration-testing.yml +++ b/.github/workflows/integration-testing.yml @@ -45,7 +45,7 @@ jobs: # --health-retries 4 # steps: - # - uses: actions/checkout@v2 + # - uses: actions/checkout@v4 # - name: Install ${{ matrix.compiler }} # uses: dlang-community/setup-dlang@v1 @@ -112,7 +112,7 @@ jobs: --health-retries 4 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install ${{ matrix.compiler }} uses: dlang-community/setup-dlang@v1 @@ -185,7 +185,7 @@ jobs: --health-retries 4 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install ${{ matrix.compiler }} uses: dlang-community/setup-dlang@v1