Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 35 additions & 40 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,43 +17,42 @@ jobs:
check:
strategy:
matrix:
version: [stable,pre-release,bleeding]
os:
- name: ubuntu-latest
triple: x86_64-linux-gnu
- name: macos-latest
triple: arm64-apple-darwin
- name: macos-13
triple: x86_64-apple-darwin
- name: windows-latest
triple: x86_64-w64-mingw32

# stable check

# pre-release check

# bleeding check
# 1. install latest toolchain
# 2. install latest core library from github.com

- ubuntu-latest
- macos-latest
- windows-latest
version:
- latest
- nightly
fail-fast: false
runs-on: ${{ matrix.os.name }}
continue-on-error: false
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.version == 'nightly' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Setup Moon
uses: illusory0x0/setup-moonbit@v0.1.0
with:
version: ${{ matrix.version }}

- name: moon version
- name: Install MoonBit CLI on *nix
if: runner.os != 'Windows'
shell: bash
run: |
curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash -s "${{ matrix.version }}"
echo "$HOME/.moon/bin" >> $GITHUB_PATH

- name: Install MoonBit CLI on Windows
if: runner.os == 'Windows'
shell: powershell
env:
MOONBIT_INSTALL_VERSION: ${{ matrix.version }}
run: |
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser; irm https://cli.moonbitlang.com/install/powershell.ps1 | iex
"C:\Users\runneradmin\.moon\bin" | Out-File -FilePath $env:GITHUB_PATH -Append

- name: Verify installation
shell: bash
run: |
moon version --all

- name: install module dependencies

- name: Update Registry
shell: bash
run: |
moon update
moon install
Expand All @@ -63,7 +62,7 @@ jobs:

- name: moon info
run: |
moon info --target wasm,wasm-gc,js,native
moon info --target all
git diff --exit-code

- name: format diff
Expand All @@ -72,22 +71,18 @@ jobs:
git diff --exit-code

- name: Setup MSVC
if: ${{ matrix.os.name == 'windows-latest' }}
if: ${{ runner.os == 'Windows' }}
uses: ilammy/msvc-dev-cmd@v1

- name: Set ulimit on unix
if: ${{ matrix.os.name != 'windows-latest' }}
if: ${{ runner.os != 'Windows' }}
run: |
ulimit -s 8176

- name: moon test
run: |
moon test --target all,native
moon test --target all,native --release

- name: moon test --doc
run: |
moon test --doc
moon test --target all
moon test --target all --release

moon-json-format-check:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -128,4 +123,4 @@ jobs:
uses: huacnlee/autocorrect-action@v2

- name: typos-action
uses: crate-ci/typos@v1.31.1
uses: crate-ci/typos@v1.31.1