add size validation for semaphore #1609
This file contains hidden or 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
| name: check | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| env: | |
| MOONBIT_ASYNC_CHECK_FD_LEAK: 1 | |
| jobs: | |
| stable-build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ["ubuntu-latest","macos-latest", "windows-latest"] | |
| runs-on: ${{ matrix.os }} | |
| continue-on-error: false | |
| timeout-minutes: 10 | |
| steps: | |
| - name: disable auto CRLF | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| run: git config --global core.autocrlf false | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '>=22.4.0' | |
| - name: install MSVC (Windows) | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: install (Unix) | |
| if: ${{ matrix.os != 'windows-latest' }} | |
| run: | | |
| curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash | |
| echo "$HOME/.moon/bin" >> $GITHUB_PATH | |
| - name: install (Windows) | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| 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: moon version | |
| run: | | |
| moon version --all | |
| moonrun --version | |
| - name: moon update | |
| run: | | |
| moon update | |
| - name: moon check | |
| run: moon check --deny-warn | |
| - name: moon check (test programs) | |
| run: moon -C src/process/test_programs check --deny-warn | |
| - name: moon test | |
| run: moon test | |
| - name: moon test (release) | |
| run: moon test --release | |
| nightly-build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ["ubuntu-latest","macos-latest", "windows-latest"] | |
| runs-on: ${{ matrix.os }} | |
| continue-on-error: false | |
| timeout-minutes: 10 | |
| steps: | |
| - name: disable auto CRLF | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| run: git config --global core.autocrlf false | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '>=22.4.0' | |
| - name: install MSVC (Windows) | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: install (Unix) | |
| if: ${{ matrix.os != 'windows-latest' }} | |
| run: | | |
| curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash -s nightly | |
| echo "$HOME/.moon/bin" >> $GITHUB_PATH | |
| - name: install (Windows) | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| env: | |
| MOONBIT_INSTALL_VERSION: nightly | |
| 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: moon version | |
| run: | | |
| moon version --all | |
| moonrun --version | |
| - name: moon update | |
| run: | | |
| moon update | |
| - name: moon check | |
| run: moon check | |
| - name: moon check (test programs) | |
| run: moon -C src/process/test_programs check | |
| - name: moon test | |
| run: moon test | |
| - name: moon test (release) | |
| run: moon test --release | |
| js-build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: install | |
| run: | | |
| curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash | |
| echo "$HOME/.moon/bin" >> $GITHUB_PATH | |
| - name: moon version | |
| run: | | |
| moon version --all | |
| moonrun --version | |
| - name: moon check | |
| run: | | |
| moon check --target js --deny-warn | |
| - name: moon test | |
| run: | | |
| moon test --release --target js | |
| moon test --target js | |
| wasm-check: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: install | |
| run: | | |
| curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash | |
| echo "$HOME/.moon/bin" >> $GITHUB_PATH | |
| - name: moon version | |
| run: | | |
| moon version --all | |
| moonrun --version | |
| - name: moon check | |
| run: | | |
| moon check --target wasm --deny-warn | |
| moon check --target wasm-gc --deny-warn | |
| moon-format: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: install | |
| run: | | |
| curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash | |
| echo "$HOME/.moon/bin" >> $GITHUB_PATH | |
| - name: moon version | |
| run: | | |
| moon version --all | |
| moonrun --version | |
| - name: moon update | |
| run: | | |
| moon update | |
| - name: format diff | |
| run: | | |
| moon fmt | |
| moon fmt --manifest-path src/process/test_programs/moon.mod.json | |
| git diff --exit-code | |
| moon-info: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: install | |
| run: | | |
| curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash | |
| echo "$HOME/.moon/bin" >> $GITHUB_PATH | |
| - name: moon version | |
| run: | | |
| moon version --all | |
| moonrun --version | |
| - name: moon update | |
| run: | | |
| moon update | |
| - name: moon info | |
| run: | | |
| moon info | |
| git diff --exit-code | |
| sanitizer-check: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '>=22.4.0' | |
| - name: install | |
| run: | | |
| curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash | |
| echo "$HOME/.moon/bin" >> $GITHUB_PATH | |
| - name: moon version | |
| run: | | |
| moon version --all | |
| moonrun --version | |
| - name: moon update | |
| run: | | |
| moon update | |
| - name: disable mimalloc | |
| run: | | |
| echo "" >dummy_libmoonbitrun.c | |
| gcc dummy_libmoonbitrun.c -c -o ~/.moon/lib/libmoonbitrun.o | |
| - name: setup sanitizer check | |
| run: | | |
| moon run --debug src/process/test_programs/setup_sanitizer_check | |
| - name: run test with address sanitizer | |
| run: | | |
| moon test | |
| sanitizer-check-windows: | |
| runs-on: windows-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: disable auto CRLF | |
| run: git config --global core.autocrlf false | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '>=22.4.0' | |
| - uses: ilammy/msvc-dev-cmd@v1 | |
| - name: install | |
| 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: moon version | |
| run: | | |
| moon version --all | |
| moonrun --version | |
| - name: moon update | |
| run: | | |
| moon update | |
| - name: disable mimalloc | |
| run: | | |
| echo "" >dummy_libmoonbitrun.c | |
| $out_path = Convert-Path ~/.moon/lib/libmoonbitrun.o | |
| cl.exe dummy_libmoonbitrun.c /c /Fo: $out_path | |
| - name: setup sanitizer check | |
| run: | | |
| moon run --debug src/process/test_programs/setup_sanitizer_check | |
| - name: run test with address sanitizer | |
| run: | | |
| $env:ASAN_OPTIONS='fast_unwind_on_malloc=0' | |
| moon test |