run gdmd #19
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: Test the action | |
on: | |
push: | |
branches: | |
- "v*" | |
- "tests" | |
pull_request: | |
branches: | |
- "*" | |
jobs: | |
verify: | |
name: Verify install | |
strategy: | |
max-parallel: 5 | |
fail-fast: false | |
matrix: | |
#os: [ubuntu-latest, windows-latest, macOS-13] | |
#dc: | |
#[ | |
#ldc, | |
#ldc-1.19.0, | |
#ldc-1.37.0-beta1, | |
#ldc-1.36, | |
#ldc-1.38b, | |
#ldc-latest, | |
#ldc-beta, | |
#ldc^3, | |
#ldc-master, | |
## Need fix for https://issues.dlang.org/show_bug.cgi?id=22942 for macOS | |
#dmd, | |
#dmd-2.099.1, | |
#dmd-2.108.1-rc.1, | |
#dmd-2.106, | |
#dmd-2.106b, | |
#dmd-latest, | |
#dmd-beta, | |
#dmd^3, | |
#dmd-master, | |
#"", | |
#] | |
#include: | |
#- os: macOS-latest | |
#arch: arm64 | |
#dc: "" | |
#- os: macOS-latest | |
#arch: arm64 | |
#dc: ldc | |
#- os: macos-latest | |
#arch: arm64 | |
#dc: ldc-1.30.0 | |
#- os: macos-latest | |
#arch: arm64 | |
#dc: ldc-1.28 # Something before ldc2-1.30.0-beta1 | |
#- os: macos-latest | |
#arch: arm64 | |
#dc: ldc-1.35.0-beta1 | |
#- os: macos-latest | |
#arch: arm64 | |
#dc: ldc-1.33b | |
#- os: macOS-latest | |
#arch: arm64 | |
#dc: ldc-latest | |
#- os: macOS-latest | |
#arch: arm64 | |
#dc: ldc-beta | |
#- os: macos-latest | |
#arch: arm64 | |
#dc: ldc^2 | |
#- os: macOS-latest | |
#arch: arm64 | |
#dc: ldc-master | |
include: | |
- os: ubuntu-latest | |
dc: gdmd-12 | |
- os: ubuntu-latest | |
dc: gdmd | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install D compiler | |
uses: ./ | |
with: | |
compiler: ${{ matrix.dc }} | |
gh_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Verify D compiler ($DC) | |
shell: bash | |
run: $DC .github/hello.d && ./hello | |
- name: Verify D compiler with explicit bitness ($DC) | |
if: ${{ startsWith(matrix.dc, 'dmd') }} | |
shell: bash | |
run: $DC -m64 .github/hello.d && ./hello | |
- name: Verify D compiler ($DC, shared) | |
if: ${{ !startsWith(matrix.dc, 'g') }} # fails with gdc | |
shell: bash | |
run: $DC -shared .github/hello.d && ./hello | |
- name: Verify D compiler (dub) | |
if: ${{ !startsWith(matrix.dc, 'g') }} # dub doesn't come with gdc by default | |
run: dub run --single -q .github/hello.d | |
- name: Install Node.js 20.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Ensure `dist/index.js` is up to date | |
env: | |
NODE_OPTIONS: "--openssl-legacy-provider" | |
run: | | |
set -euxo pipefail | |
npm ci | |
npm run build | |
# exclude dist/index.js.map (different on Windows) | |
git diff --stat --exit-code HEAD -- ':!dist/index.js.map' | |
shell: bash | |
dub: | |
name: Verify standalone DUB install | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macOS-13 ] | |
#dc: [ ldc-latest, dmd-latest, gdc-12, gdmd ] | |
dc: [ gdc, gdmd-12 ] | |
dub: [ 1.19.0, 1.23.0, latest ] | |
exclude: | |
# Excluded because those are actually Linux executables | |
- { os: windows-latest, dub: 1.19.0 } | |
# gdc only supports linux | |
- { os: windows-latest, dc: gdc } | |
- { os: windows-latest, dc: gdmd-12 } | |
- { os: macOS-13, dc: gdc } | |
- { os: macOS-13, dc: gdmd-12 } | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install D compiler | |
uses: ./ | |
with: | |
compiler: ${{ matrix.dc }} | |
dub: ${{ matrix.dub }} | |
gdmd_sha: '563e438265252429455489d845002362d3b8991e' | |
- name: Verify DUB version | |
shell: bash | |
run: | | |
if [[ ${{ matrix.dub }} == 'latest' ]] | |
then | |
DUB_VERSION_FOR_TEST=$(curl -s https://api.github.com/repos/dlang/dub/releases/latest | jq -r '.tag_name | sub("v(?<v>.+)"; .v)') | |
else | |
DUB_VERSION_FOR_TEST=${{ matrix.dub }} | |
fi | |
echo "dub path is: `which dub`" | |
echo "dub version is: `dub --version`" | |
echo "We expect version: $DUB_VERSION_FOR_TEST" | |
if [[ "$(dub --version)" =~ "version $DUB_VERSION_FOR_TEST" ]] | |
then | |
echo "Match" | |
else | |
exit 1 | |
fi | |
- name : Compile with dub | |
shell: bash | |
run: | | |
#cd .github && DFLAGS=-vdmd dub run --single --vverbose hello.d --compiler=${DC} | |
cd .github && gdmd -vcolumns -c -ofhello hello.d -vdmd -w -version=Have_hello |