CI #31
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: CI | |
on: | |
schedule: | |
- cron: '15 3 1 * *' | |
push: | |
pull_request: | |
jobs: | |
# Make sure the latest versions of dub and ldc work on all platforms | |
build: | |
name: ${{ matrix.dc }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest ] | |
dc: | |
- dmd-latest | |
- ldc-latest | |
- dmd-2.106.1 # (released in 2024) | |
- 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 # (released in 2023) ## excluded due to a compiler bug | |
- dmd-2.100.2 # (released in 2022) ## GDC 12 can support 2.100 | |
- dmd-2.099.1 # (released in 2022) | |
- dmd-2.098.1 # (released in 2021) | |
- dmd-2.097.2 # (released in 2021) ## HibernateD & DDBC require >=2.097 | |
- dmd-2.096.1 # (released in 2021) | |
# - dmd-2.095.1 # (released in 2021) | |
# - dmd-2.094.2 # (released in 2020) | |
# - dmd-2.093.1 # (released in 2020) | |
# - dmd-2.092.1 # (released in 2020) | |
# - dmd-2.091.1 # (released in 2020) | |
# - dmd-2.090.1 # (released in 2020) | |
# - dmd-2.089.1 | |
# - dmd-2.088.1 | |
# - dmd-2.087.1 | |
# - dmd-2.086.1 | |
- dmd-2.085.1 | |
- dmd-2.077.1 | |
- dmd-2.076.1 # (from 2017) gdc (gcc v9 - v11.1) supports D at this version | |
- ldc-1.25.1 # eq to dmd v2.095.1 | |
- ldc-1.24.0 # eq to dmd v2.094.1 | |
- ldc-1.23.0 # eq to dmd v2.093.1 | |
# - ldc-1.22.0 # eq to dmd v2.092.1 | |
# - ldc-1.21.0 # eq to dmd v2.091.1 | |
# - ldc-1.20.1 # eq to dmd v2.090.1 | |
# - ldc-1.19.0 # eq to dmd v2.089.1 | |
# - ldc-1.18.0 # eq to dmd v2.088.1 | |
# - ldc-1.17.0 # eq to dmd v2.087 | |
# - ldc-1.16.0 # eq to dmd v2.086.1 | |
- ldc-1.15.0 # eq to dmd v2.085.1 | |
include: | |
- { os: windows-latest, compiler: dmd-latest } # Windows Server 2022 | |
- { os: windows-latest, compiler: ldc-latest } # Windows Server 2022 | |
- { os: macos-latest, dc: dmd-latest } | |
- { os: macos-latest, dc: ldc-latest } | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install D ${{ matrix.dc }} | |
uses: dlang-community/setup-dlang@v1 | |
with: | |
compiler: ${{ matrix.dc }} | |
- name: Dub Build | |
env: | |
DC: gdc | |
run: dub build --build=release | |
- name: Dub Test | |
env: | |
DC: gdc | |
run: dub test | |
# On Ubuntu we can use GDC (so keep working for D version 2.076) | |
gdc-latest: | |
name: GDC on Ubuntu | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install DMD (so dub is available) | |
uses: dlang-community/setup-dlang@v1 | |
with: | |
compiler: dmd-latest | |
- name: Install GDC | |
run: | | |
sudo apt-get update | |
sudo apt-get install gdc -y | |
gdc --version | |
- name: Dub Build | |
env: | |
DC: gdc | |
run: dub build --compiler=gdc --build=release | |
- name: Dub Test | |
env: | |
DC: gdc | |
run: dub test --compiler=gdc | |
integration-test: | |
name: Integration Test | |
#needs: build | |
#if: ${{ needs.build.result == 'success' }} | |
runs-on: ubuntu-latest | |
services: | |
mssql: | |
#image: microsoft/mssql-server-linux:2017-latest | |
#image: mcr.microsoft.com/mssql/server:2017-latest | |
image: mcr.microsoft.com/mssql/server:2019-latest | |
ports: [1433] | |
env: | |
MSSQL_PID: Developer | |
SA_PASSWORD: bbk4k77JKH88g54 | |
ACCEPT_EULA: Y | |
# options: >- | |
# --health-cmd "sqlcmd -S localhost -U sa -P bbk4k77JKH88g54 -Q 'SELECT 1' || exit 1" | |
# --health-interval 10s | |
# --health-timeout 3s | |
# --health-retries 3 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install DMD | |
uses: dlang-community/setup-dlang@v1 | |
with: | |
compiler: dmd-latest | |
- name: Install ODBC Driver | |
run: sudo ACCEPT_EULA=Y apt-get install msodbcsql17 -y | |
- name: Build Test Project | |
run: dub build --config=integration-test | |
- name: Run Test Project (SQL Server) | |
working-directory: ./test | |
env: | |
PORT: ${{ job.services.mssql.ports[1433] }} | |
run: ./odbctest "Driver={ODBC Driver 17 for SQL Server};Server=127.0.0.1,$PORT;Uid=sa;Pwd=bbk4k77JKH88g54;" | |