Skip to content

Commit

Permalink
Define compiler versions as workflow parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
kuniss committed Jan 3, 2024
1 parent fb4287e commit c071bc8
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 9 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: Build Gamma

on:
workflow_call
workflow_call:
inputs:
lcd_compiler_version:
type: string
required: true

jobs:
build:
name: Matrix Build Gamma
name: Build Gamma
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
Expand All @@ -18,7 +22,7 @@ jobs:
- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: ldc-1.33.0
compiler: ${{ inputs.lcd_compiler_version }}

- name: Run build
run: |
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
name: Check Gamma project
name: Check Gamma Project

on:
workflow_call
workflow_call:
inputs:
dmd_compiler_version:
type: string
required: true

jobs:
check:
Expand All @@ -14,7 +18,7 @@ jobs:
- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: dmd-2.103.1
compiler: ${{ inputs.dmd_compiler_version }}

- run: |
dub fetch [email protected]
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ on: [push, pull_request]
jobs:
build:
uses: ./.github/workflows/build.yml
with:
lcd_compiler_version: ldc-1.33.0

test:
uses: ./.github/workflows/test.yml
with:
dmd_compiler_version: dmd-2.103.1

check:
uses: ./.github/workflows/check.yml
with:
dmd_compiler_version: dmd-2.103.1
10 changes: 7 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: Test Gamma

on:
workflow_call
workflow_call:
inputs:
dmd_compiler_version:
type: string
required: true

jobs:
test:
name: Matrix Test Gamma
name: Test Gamma
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
Expand All @@ -18,7 +22,7 @@ jobs:
- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: dmd-2.103.1
compiler: ${{ inputs.dmd_compiler_version }}

- name: Run tests
run: |
Expand Down

0 comments on commit c071bc8

Please sign in to comment.