Skip to content

Commit

Permalink
Rename matrix.os to matrix.runner
Browse files Browse the repository at this point in the history
The runner corresponds to a platform (arch and os),
particularly for macOS
  • Loading branch information
MatthewFluet committed May 15, 2024
1 parent f8e5459 commit 1a3a0bf
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,36 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13, macos-14, windows-latest]
runner: [ubuntu-latest, macos-13, macos-14, windows-latest]
cc: ["gcc", "clang"]
codegen: ["amd64", "c", "llvm"]
exclude:
- os: macos-13
- runner: macos-13
cc: "gcc"
- os: macos-14
- runner: macos-14
cc: "gcc"
- os: macos-14
- runner: macos-14
codegen: "amd64"
- os: windows-latest
- runner: windows-latest
cc: "clang"
- os: windows-latest
- runner: windows-latest
codegen: "c"
- os: windows-latest
- runner: windows-latest
codegen: "llvm"
- cc: "gcc"
codegen: "llvm"

# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.runner }}

defaults:
run:
shell: ${{ (startsWith(matrix.os, 'windows') && 'msys2 {0}') || 'bash' }}
shell: ${{ (startsWith(matrix.runner, 'windows') && 'msys2 {0}') || 'bash' }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Configure git (windows)
if: ${{ startsWith(matrix.os, 'windows') }}
if: ${{ startsWith(matrix.runner, 'windows') }}
run: git config --global core.autocrlf false
shell: bash

Expand All @@ -51,7 +51,7 @@ jobs:
uses: actions/checkout@v4

- name: Install dependencies (ubuntu)
if: ${{ startsWith(matrix.os, 'ubuntu') }}
if: ${{ startsWith(matrix.runner, 'ubuntu') }}
run: |
sudo apt-get update
sudo apt-get install libgmp-dev
Expand All @@ -63,7 +63,7 @@ jobs:
rmdir mlton-20210117-1.amd64-linux-glibc2.31
- name: Install dependencies (macos (amd64))
if: ${{ matrix.os == 'macos-13' }}
if: ${{ matrix.runner == 'macos-13' }}
run: |
# brew update
brew install gmp
Expand All @@ -76,7 +76,7 @@ jobs:
rmdir mlton-20210117-1.amd64-darwin-19.6.gmp-homebrew
- name: Install dependencies (macos (arm64))
if: ${{ matrix.os == 'macos-14' }}
if: ${{ matrix.runner == 'macos-14' }}
run: |
# brew update
brew install gmp
Expand All @@ -89,7 +89,7 @@ jobs:
rmdir mlton-20210117-1.arm64-darwin-21.6-gmp-static
- name: Install msys2 (windows)
if: ${{ startsWith(matrix.os, 'windows') }}
if: ${{ startsWith(matrix.runner, 'windows') }}
uses: msys2/setup-msys2@v2
with:
update: false
Expand All @@ -98,7 +98,7 @@ jobs:
git
pactoys
- name: Install dependencies (windows)
if: ${{ startsWith(matrix.os, 'windows') }}
if: ${{ startsWith(matrix.runner, 'windows') }}
run: |
pacboy --noconfirm -S --needed gcc:p gmp-devel:
mkdir boot && cd boot
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
$( if [[ -n "$WITH_GMP_DIR" ]]; then echo "WITH_GMP_DIR=$WITH_GMP_DIR"; fi ) \
WITH_ALL_RUNTIME=true \
WITH_DBG_RUNTIME=false \
MLTON_BINARY_RELEASE_SUFFIX=".${{ matrix.os }}_${{ matrix.cc }}_${{ matrix.codegen }}" \
MLTON_BINARY_RELEASE_SUFFIX=".${{ matrix.runner }}_${{ matrix.cc }}_${{ matrix.codegen }}" \
all
- name: Test
Expand All @@ -148,11 +148,11 @@ jobs:
$( if [[ -n "$WITH_GMP_DIR" ]]; then echo "WITH_GMP_DIR=$WITH_GMP_DIR"; fi ) \
WITH_ALL_RUNTIME=true \
WITH_DBG_RUNTIME=false \
MLTON_BINARY_RELEASE_SUFFIX=".${{ matrix.os }}_${{ matrix.cc }}_${{ matrix.codegen }}" \
MLTON_BINARY_RELEASE_SUFFIX=".${{ matrix.runner }}_${{ matrix.cc }}_${{ matrix.codegen }}" \
binary-release
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: mlton.${{ matrix.os }}_${{ matrix.cc }}_${{ matrix.codegen }}
name: mlton.${{ matrix.runner }}_${{ matrix.cc }}_${{ matrix.codegen }}
path: ./*.tgz

0 comments on commit 1a3a0bf

Please sign in to comment.