From b606cdab17fdcd894f4cb0aa1d61e0bce04fd54d Mon Sep 17 00:00:00 2001 From: Matthew Fluet Date: Wed, 15 May 2024 10:12:36 -0400 Subject: [PATCH 1/7] Exclude `cc: "gcc"` from `os: macos-13` --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5dbb57a40..c6110c504 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: exclude: - cc: "gcc" codegen: "llvm" - - os: macos-latest + - os: macos-13 cc: "gcc" - os: windows-latest codegen: "c" From b250f106486da39fb016c31a2eab7378077ed9e0 Mon Sep 17 00:00:00 2001 From: Matthew Fluet Date: Wed, 15 May 2024 10:27:33 -0400 Subject: [PATCH 2/7] GitHub `macos-13` runner is amd64 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6110c504..92abbd88e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,8 +58,8 @@ jobs: mv mlton-20210117-1.amd64-linux-glibc2.31/* . rmdir mlton-20210117-1.amd64-linux-glibc2.31 - - name: Install dependencies (macos) - if: ${{ startsWith(matrix.os, 'macos') }} + - name: Install dependencies (macos (amd64)) + if: ${{ matrix.os == 'macos-13' }} run: | # brew update brew install gmp From aaf598caf368ff7125dfe6d1f56e8702815a701e Mon Sep 17 00:00:00 2001 From: Matthew Fluet Date: Wed, 15 May 2024 10:33:43 -0400 Subject: [PATCH 3/7] Reorder workflow excludes --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92abbd88e..1af7685a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,16 +17,16 @@ jobs: cc: ["gcc", "clang"] codegen: ["amd64", "c", "llvm"] exclude: - - cc: "gcc" - codegen: "llvm" - os: macos-13 cc: "gcc" + - os: windows-latest + cc: "clang" - os: windows-latest codegen: "c" - os: windows-latest codegen: "llvm" - - os: windows-latest - cc: "clang" + - cc: "gcc" + codegen: "llvm" # The type of runner that the job will run on runs-on: ${{ matrix.os }} From 669efbd63c1e1c5d1c099b378fc55ff55341b21f Mon Sep 17 00:00:00 2001 From: Matthew Fluet Date: Wed, 15 May 2024 10:37:56 -0400 Subject: [PATCH 4/7] Experiment with macos-14 (arm64) CI --- .github/workflows/ci.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1af7685a1..8fd6f4fd3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,12 +13,16 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-13, windows-latest] + os: [ubuntu-latest, macos-13, macos-14, windows-latest] cc: ["gcc", "clang"] codegen: ["amd64", "c", "llvm"] exclude: - os: macos-13 cc: "gcc" + - os: macos-14 + cc: "gcc" + - os: macos-14 + codegen: "amd64" - os: windows-latest cc: "clang" - os: windows-latest @@ -71,6 +75,19 @@ jobs: mv mlton-20210117-1.amd64-darwin-19.6.gmp-homebrew/* . rmdir mlton-20210117-1.amd64-darwin-19.6.gmp-homebrew + - name: Install dependencies (macos (arm64)) + if: ${{ matrix.os == 'macos-14' }} + run: | + # brew update + brew install gmp + echo "WITH_GMP_DIR=/opt/homebrew" >> $GITHUB_ENV + if [[ "${{ matrix.codegen }}" == "llvm" ]]; then brew install llvm; echo "$(brew --prefix llvm)/bin" >> $GITHUB_PATH; fi + mkdir boot && cd boot + curl -O -L https://projects.laas.fr/tina/software/mlton-20210117-1.arm64-darwin-21.6-gmp-static.tgz + tar xzf mlton-20210117-1.arm64-darwin-21.6-gmp-static.tgz --exclude='*/share' + mv mlton-20210117-1.arm64-darwin-21.6-gmp-static/* . + rmdir mlton-20210117-1.arm64-darwin-21.6-gmp-static + - name: Install msys2 (windows) if: ${{ startsWith(matrix.os, 'windows') }} uses: msys2/setup-msys2@v2 From c957181c94afc58b4745d28f6ddf367bd453847f Mon Sep 17 00:00:00 2001 From: Matthew Fluet Date: Wed, 15 May 2024 10:38:58 -0400 Subject: [PATCH 5/7] Rename `matrix.os` to `matrix.runner` The runner corresponds to a platform (arch and os), particularly for macOS --- .github/workflows/ci.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8fd6f4fd3..0eb06f2df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 From a928b7b4fb6bd42351e848d3332302da34014660 Mon Sep 17 00:00:00 2001 From: Matthew Fluet Date: Wed, 15 May 2024 14:41:09 -0400 Subject: [PATCH 6/7] Skip `world*` regression tests on `darwin` `-no-pie` (required for `MLton.Word.{save,load}`) is deprecated in macOS 13 and ignored (on arm64) in macOS 14 --- bin/regression | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/regression b/bin/regression index eb5c57e23..64b6d2702 100755 --- a/bin/regression +++ b/bin/regression @@ -139,6 +139,13 @@ for f in *.sml; do ;; esac ;; + darwin) + case "$f" in + world*) + continue + ;; + esac + ;; hurd) # Work-around hurd bug (http://bugs.debian.org/551470) case "$f" in From 6dc51678e681d895d193c43392f434a761f50e8f Mon Sep 17 00:00:00 2001 From: Matthew Fluet Date: Wed, 15 May 2024 16:45:14 -0400 Subject: [PATCH 7/7] Try enabling the `runner: windows-latest`/`codegen: "c"` CI workflow --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0eb06f2df..f88e2ada6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,8 +25,6 @@ jobs: codegen: "amd64" - runner: windows-latest cc: "clang" - - runner: windows-latest - codegen: "c" - runner: windows-latest codegen: "llvm" - cc: "gcc"