| 1 | name: Binary Release |
| 2 | |
| 3 | on: |
| 4 | workflow_dispatch: |
| 5 | inputs: |
| 6 | mlton-version: |
| 7 | required: true |
| 8 | type: string |
| 9 | workflow_call: |
| 10 | inputs: |
| 11 | mlton-version: |
| 12 | required: true |
| 13 | type: string |
| 14 | |
| 15 | jobs: |
| 16 | binary-release: |
| 17 | strategy: |
| 18 | fail-fast: false |
| 19 | matrix: |
| 20 | include: |
| 21 | - runner: "ubuntu-24.04" |
| 22 | mlton-binary-release-suffix: ".${RUNNER}_glibc$(cc -dM -E - <<< '#include <stdlib.h>' | sed -En 's;#define __GLIBC__ (.*);\\1;p').$(cc -dM -E - <<< '#include <stdlib.h>' | sed -En 's;#define __GLIBC_MINOR__ (.*);\\1;p')" |
| 23 | - runner: "ubuntu-24.04" |
| 24 | mlton-compile-args: "-link-opt -static" |
| 25 | mlton-binary-release-suffix: ".${RUNNER}_static" |
| 26 | - runner: "ubuntu-22.04" |
| 27 | mlton-binary-release-suffix: ".${RUNNER}_glibc$(cc -dM -E - <<< '#include <stdlib.h>' | sed -En 's;#define __GLIBC__ (.*);\\1;p').$(cc -dM -E - <<< '#include <stdlib.h>' | sed -En 's;#define __GLIBC_MINOR__ (.*);\\1;p')" |
| 28 | - runner: "ubuntu-22.04" |
| 29 | mlton-compile-args: "-link-opt -static" |
| 30 | mlton-binary-release-suffix: ".${RUNNER}_static" |
| 31 | - runner: "ubuntu-20.04" |
| 32 | mlton-binary-release-suffix: ".${RUNNER}_glibc$(cc -dM -E - <<< '#include <stdlib.h>' | sed -En 's;#define __GLIBC__ (.*);\\1;p').$(cc -dM -E - <<< '#include <stdlib.h>' | sed -En 's;#define __GLIBC_MINOR__ (.*);\\1;p')" |
| 33 | - runner: "ubuntu-20.04" |
| 34 | mlton-compile-args: "-link-opt -static" |
| 35 | mlton-binary-release-suffix: ".${RUNNER}_static" |
| 36 | - runner: "macos-13" |
| 37 | mlton-binary-release-suffix: ".${RUNNER}_gmp-homebrew" |
| 38 | - runner: "macos-13" |
| 39 | mlton-compile-args: "-gmp-link-opt $(brew --prefix)/lib/libgmp.a" |
| 40 | mlton-binary-release-suffix: ".${RUNNER}_gmp-static" |
| 41 | - runner: "macos-14" |
| 42 | mlton-binary-release-suffix: ".${RUNNER}_gmp-homebrew" |
| 43 | - runner: "macos-14" |
| 44 | mlton-compile-args: "-gmp-link-opt $(brew --prefix)/lib/libgmp.a" |
| 45 | mlton-binary-release-suffix: ".${RUNNER}_gmp-static" |
| 46 | - runner: "macos-15" |
| 47 | mlton-binary-release-suffix: ".${RUNNER}_gmp-homebrew" |
| 48 | - runner: "macos-15" |
| 49 | mlton-compile-args: "-gmp-link-opt $(brew --prefix)/lib/libgmp.a" |
| 50 | mlton-binary-release-suffix: ".${RUNNER}_gmp-static" |
| 51 | - runner: "windows-2022" |
| 52 | msystem: "mingw64" |
| 53 | mlton-binary-release-suffix: ".${RUNNER}_msys2_${MSYSTEM}" |
| 54 | - runner: "windows-2022" |
| 55 | msystem: "mingw64" |
| 56 | mlton-compile-args: "-link-opt -static" |
| 57 | mlton-binary-release-suffix: ".${RUNNER}_msys2_${MSYSTEM}_static" |
| 58 | - runner: "windows-2022" |
| 59 | msystem: "ucrt64" |
| 60 | mlton-binary-release-suffix: ".${RUNNER}_msys2_${MSYSTEM}" |
| 61 | - runner: "windows-2022" |
| 62 | msystem: "ucrt64" |
| 63 | mlton-compile-args: "-link-opt -static" |
| 64 | mlton-binary-release-suffix: ".${RUNNER}_msys2_${MSYSTEM}_static" |
| 65 | - runner: "windows-2022" |
| 66 | msystem: "clang64" |
| 67 | mlton-binary-release-suffix: ".${RUNNER}_msys2_${MSYSTEM}" |
| 68 | - runner: "windows-2022" |
| 69 | msystem: "clang64" |
| 70 | mlton-compile-args: "-link-opt -static" |
| 71 | mlton-binary-release-suffix: ".${RUNNER}_msys2_${MSYSTEM}_static" |
| 72 | |
| 73 | uses: ./.github/workflows/binary-release-single.yml |
| 74 | with: |
| 75 | mlton-version: ${{ inputs.mlton-version }} |
| 76 | runner: ${{ matrix.runner }} |
| 77 | msystem: ${{ matrix.msystem }} |
| 78 | old-mlton-runtime-args: ${{ matrix.old-mlton-runtime-args }} |
| 79 | old-mlton-compile-args: ${{ matrix.old-mlton-compile-args }} |
| 80 | mlton-runtime-args: ${{ matrix.mlton-runtime-args }} |
| 81 | mlton-compile-args: ${{ matrix.mlton-compile-args }} |
| 82 | mlton-binary-release-suffix: ${{ matrix.mlton-binary-release-suffix }} |
| 83 | secrets: inherit |