Skip to content

Commit

Permalink
Fix macOS CI job by pre-selecting the OpenSSL version.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Feb 17, 2024
1 parent 6ecb413 commit 1e0f857
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,19 @@ jobs:
- { os: windows-latest, dc: dmd-2.091.1, arch: x86_64 }
- { os: windows-latest, dc: ldc-1.20.1, arch: x86_64 }

runs-on: ${{ matrix.os }}
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3

- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: ${{ matrix.dc }}
compiler: ${{matrix.dc}}

- name: Run tests
env:
DC: ${{matrix.dc}}
ARCH: ${{matrix.arch}}
OS: ${{matrix.os}}
shell: bash
run: dub test && dub test :tls
run: ./run-ci.sh
28 changes: 28 additions & 0 deletions run-ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

set -e -x -o pipefail

DCVER=${DC#*-}
DC=${DC%-*}
if [ "$DC" == "ldc" ]; then DC="ldc2"; fi
DUB_FLAGS=${DUB_FLAGS:-} --compiler=$DC


# Check for trailing whitespace"
grep -nrI --include='*.d' '\s$' . && (echo "Trailing whitespace found"; exit 1)

# test for successful release build
dub build -b release $DUB_FLAGS

# test for successful 32-bit build
if [ "$DC" == "dmd" ]; then
dub build --arch=x86 $DUB_FLAGS
fi

dub test $DUB_FLAGS

if [ "$OS" == "macos-latest" ]; then
dub test :tls $DUB_FLAGS
else
dub test :tls -c openssl-1.1 $DUB_FLAGS
fi

0 comments on commit 1e0f857

Please sign in to comment.