Skip to content
Open
Show file tree
Hide file tree
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
21 changes: 21 additions & 0 deletions .github/actions/test-native-release/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Run MoonBit Native Release Tests"
description: "Run MoonBit tests with --target native --release"
runs:
using: "composite"
steps:
- name: Set ulimit and run moon test (--release + --target native)
if: ${{ runner.os != 'Windows' }}
shell: bash
run: |
ulimit -s 8176
moon test --target native --release

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

- name: Run moon test on Windows (--release + --target native)
if: ${{ runner.os == 'Windows' }}
shell: bash
run: |
moon test --target native --release
42 changes: 42 additions & 0 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Run MoonBit Tests"
description: "Run comprehensive MoonBit tests across all targets"
runs:
using: "composite"
steps:
- name: Set ulimit and run moon test
if: ${{ runner.os != 'Windows' }}
shell: bash
run: |
ulimit -s 8176
moon test --target all
moon test --release --target js,wasm,wasm-gc # native test in release mode is run in a separate job

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

- name: Run moon test on Windows
if: ${{ runner.os == 'Windows' }}
shell: bash
run: |
moon test --target all
moon test --release --target js,wasm,wasm-gc # native test in release mode is run in a separate job

- name: Run moon test with JS builtin string
if: ${{ runner.os != 'Windows' }}
shell: bash
run: |
ulimit -s 8176
moon test --target wasm-gc
moon test --target wasm-gc --release
env:
MOONC_INTERNAL_PARAMS: use_js_builtin_string = 1 |

- name: Run moon test with JS builtin string
if: ${{ runner.os == 'Windows' }}
shell: bash
run: |
moon test --target wasm-gc
moon test --target wasm-gc --release
env:
MOONC_INTERNAL_PARAMS: use_js_builtin_string = 1 |
45 changes: 4 additions & 41 deletions .github/workflows/bleeding-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,8 @@ jobs:
with:
version: nightly

- name: Set ulimit and run moon test
if: ${{ matrix.os != 'windows-latest' }}
run: |
ulimit -s 8176
moon test --target all
moon test --release --target all
moon test --target native
moon test --release --target native

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

- name: Run moon test on Windows (--target all)
if: ${{ matrix.os == 'windows-latest' }}
run: |
moon test --target all

- name: Run moon test on Windows (--release + --target all)
if: ${{ matrix.os == 'windows-latest' }}
run: |
moon test --release --target all

- name: Run moon test on Windows (--target native)
if: ${{ matrix.os == 'windows-latest' }}
run: |
moon test --target native
- name: run tests
uses: ./.github/actions/test

- name: Test new allocator
run: |
Expand Down Expand Up @@ -96,17 +71,5 @@ jobs:
run: |
moon version --all

- name: Set ulimit and run moon test (--release + --target native)
if: ${{ matrix.os != 'windows-latest' }}
run: |
ulimit -s 8176
moon test --target native --release

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

- name: Run moon test on Windows (--release + --target native)
if: ${{ matrix.os == 'windows-latest' }}
run: |
moon test --target native --release
- name: run native release tests
uses: ./.github/actions/test-native-release
57 changes: 25 additions & 32 deletions .github/workflows/pre-release-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,38 +140,8 @@ jobs:
- name: check
run: moon check --deny-warn

- name: Set ulimit and run moon test
if: ${{ matrix.os != 'windows-latest' }}
run: |
ulimit -s 8176
moon test --target all
moon test --release --target all
moon test --target native
moon test --target native --release

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

- name: Run moon test on Windows (--target all)
if: ${{ matrix.os == 'windows-latest' }}
run: |
moon test --target all

- name: Run moon test on Windows (--release + --target all)
if: ${{ matrix.os == 'windows-latest' }}
run: |
moon test --release --target all

- name: Run moon test on Windows (--target native)
if: ${{ matrix.os == 'windows-latest' }}
run: |
moon test --target native

- name: Run moon test on Windows (--release + --target native)
if: ${{ matrix.os == 'windows-latest' }}
run: |
moon test --target native --release
- name: run tests
uses: ./.github/actions/test

- name: moon test --doc
run: |
Expand All @@ -194,3 +164,26 @@ jobs:
- name: check core size on windows
if: ${{ matrix.os == 'windows-latest' }}
run: Get-ChildItem -Path ".\target" -Recurse -Filter "*.core" | ForEach-Object { "{0} ({1} bytes)" -f $_.FullName, $_.Length }

pre-release-native-opt-test:
needs: version-check
if: ${{ needs.version-check.outputs.should-skip == 'false' }}
continue-on-error: true
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: install
uses: ./.github/actions/setup
with:
version: pre-release

- name: check
run: moon check --target native --deny-warn

- name: run native release tests
uses: ./.github/actions/test-native-release
45 changes: 4 additions & 41 deletions .github/workflows/stable-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,33 +34,8 @@ jobs:
moon fmt
git diff --exit-code

- name: Set ulimit and run moon test
if: ${{ matrix.os != 'windows-latest' }}
run: |
ulimit -s 8176
moon test --target all
moon test --release --target all
moon test --target native
moon test --release --target native

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

- name: Run moon test on Windows (--target all)
if: ${{ matrix.os == 'windows-latest' }}
run: |
moon test --target all

- name: Run moon test on Windows (--release + --target all)
if: ${{ matrix.os == 'windows-latest' }}
run: |
moon test --release --target all

- name: Run moon test on Windows (--target native)
if: ${{ matrix.os == 'windows-latest' }}
run: |
moon test --target native
- name: run tests
uses: ./.github/actions/test

- name: moon bundle
run: moon bundle --all
Expand Down Expand Up @@ -89,17 +64,5 @@ jobs:
- name: check
run: moon check --target native --deny-warn

- name: Set ulimit and run moon test (--release + --target native)
if: ${{ matrix.os != 'windows-latest' }}
run: |
ulimit -s 8176
moon test --target native --release

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

- name: Run moon test on Windows (--release + --target native)
if: ${{ matrix.os == 'windows-latest' }}
run: |
moon test --target native --release
- name: run native release tests
uses: ./.github/actions/test-native-release