forked from MLton/mlton
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
18add0c
commit c777631
Showing
7 changed files
with
213 additions
and
31 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: Binary Release (single) | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
mlton-version: | ||
required: true | ||
type: string | ||
runner: | ||
required: true | ||
type: string | ||
binary-release-suffix: | ||
required: false | ||
type: string | ||
workflow_call: | ||
inputs: | ||
mlton-version: | ||
required: true | ||
type: string | ||
runner: | ||
required: true | ||
type: string | ||
binary-release-suffix: | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
binary-release-single: | ||
|
||
runs-on: ${{ inputs.runner }} | ||
|
||
defaults: | ||
run: | ||
shell: ${{ (startsWith(matrix.runner, 'windows') && 'msys2 {0}') || 'bash' }} | ||
|
||
env: | ||
MLTON_VERSION: ${{ inputs.mlton-version }} | ||
MLTON_BINARY_RELEASE_SUFFIX: ${{ inputs.binary-release-suffix }} | ||
|
||
steps: | ||
- name: Configure git | ||
run: git config --global core.autocrlf false | ||
shell: bash | ||
|
||
- name: Install msys2 (windows) | ||
if: ${{ startsWith(inputs.runner, 'windows') }} | ||
uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: MINGW64 | ||
update: false | ||
install: >- | ||
base-devel | ||
git | ||
pactoys | ||
packboy: >- | ||
github-cli:p | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: .github | ||
ref: workflow-updates | ||
|
||
- name: Install bootstrap dependencies | ||
uses: ./.github/actions/install-bootstrap-dependencies | ||
with: | ||
runner: ${{ inputs.runner }} | ||
install-llvm: false | ||
|
||
- name: Download and unpack source release | ||
run: | | ||
curl -L https://github.com/${{ github.repository }}/releases/download/on-${MLTON_VERSION}-release/mlton-${MLTON_VERSION}.src.tgz | tar xz --strip-components=1 | ||
- name: Make binary release | ||
if: ${{ false }} | ||
run: | | ||
# make binary-release \ | ||
PATH=$(pwd)/boot/bin:$PATH \ | ||
make \ | ||
OLD_MLTON_RUNTIME_ARGS="ram-slop 0.90" \ | ||
OLD_MLTON_COMPILE_ARGS="" \ | ||
MLTON_RUNTIME_ARGS="ram-slop 0.90" \ | ||
MLTON_COMPILE_ARGS="" \ | ||
$( if [[ -n "$WITH_GMP_DIR" ]]; then echo "WITH_GMP_DIR=$WITH_GMP_DIR"; fi ) \ | ||
MLTON_BINARY_RELEASE_SUFFIX=$MLTON_BINARY_RELEASE_SUFFIX \ | ||
binary-release | ||
- name: Upload binary release | ||
run: gh release upload on-${MLTON_VERSION}-release mlton-${MLTON_VERSION}*.tgz --clobber | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Binary Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
mlton-version: | ||
required: true | ||
type: string | ||
workflow_call: | ||
inputs: | ||
mlton-version: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
binary-release: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- runner: "ubuntu-24.04" | ||
binary-release-suffix: "" | ||
- runner: "macos-13" | ||
binary-release-suffix: "" | ||
- runner: "macos-14" | ||
binary-release-suffix: "" | ||
- runner: "windows-2022" | ||
binary-release-suffix: "" | ||
|
||
uses: ./.github/workflows/binary-release-single.yml | ||
with: | ||
mlton-version: ${{ inputs.mlton-version }} | ||
runner: ${{ matrix.runner }} | ||
binary-release-suffix: ${{ matrix.binary-release-suffix }} | ||
secrets: inherit |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
mlton-version: | ||
runs-on: ubuntu-24.04 | ||
outputs: | ||
mlton-version: ${{ steps.mlton-version.outputs.mlton-version }} | ||
steps: | ||
- name: mlton-version | ||
id: mlton-version | ||
run: | | ||
MLTON_VERSION=$( echo '${{ github.ref_name }}' | sed -En 's;on-([0-9]{8})-release;\1;p') | ||
if [ -n "${MLTON_VERSION}" ]; then echo "mlton-version=${MLTON_VERSION}" >> "$GITHUB_OUTPUT"; else echo "Unable to determine MLTON_VERSION"; exit 1; fi | ||
source-release: | ||
needs: mlton-version | ||
uses: ./.github/workflows/source-release.yml | ||
with: | ||
mlton-version: ${{ needs.mlton-version.outputs.mlton-version }} | ||
secrets: inherit | ||
|
||
binary-release: | ||
needs: [mlton-version, source-release] | ||
uses: ./.github/workflows/binary-release.yml | ||
with: | ||
mlton-version: ${{ needs.mlton-version.outputs.mlton-version }} | ||
secrets: inherit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Source Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
mlton-version: | ||
required: true | ||
type: string | ||
workflow_call: | ||
inputs: | ||
mlton-version: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
source-release: | ||
runs-on: ubuntu-24.04 | ||
env: | ||
MLTON_VERSION: ${{ inputs.mlton-version }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: on-${{ inputs.mlton-version }}-release | ||
fetch-depth: 0 | ||
- name: Install guide dependencies | ||
uses: ./.github/actions/install-guide-dependencies | ||
- name: Make source release | ||
run: make MLTON_VERSION=${MLTON_VERSION} source-release | ||
- name: Upload source release | ||
run: gh release upload on-${MLTON_VERSION}-release mlton-${MLTON_VERSION}.src.tgz --clobber | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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