Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add bleeding check #88

Merged
merged 2 commits into from
Jan 3, 2025
Merged
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
63 changes: 62 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:

jobs:
build:
stable-build:
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -66,6 +66,67 @@ jobs:
moon fmt
git diff --exit-code

bleeding-build:
strategy:
fail-fast: false
matrix:
os:
- name: ubuntu-latest
path: ubuntu_x86_64_moon_setup
- name: macos-latest
path: mac_intel_moon_setup
- name: macos-14
path: mac_m1_moon_setup
- name: windows-latest

runs-on: ${{ matrix.os.name }}
continue-on-error: ${{ matrix.os.name == 'macos-14' }}
steps:
- uses: actions/checkout@v4

- name: install
if: ${{ matrix.os.name != 'windows-latest' }}
run: |
curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash -s bleeding
echo "$HOME/.moon/bin" >> $GITHUB_PATH

- name: install on windows
env:
MOONBIT_INSTALL_VERSION: bleeding
if: ${{ matrix.os.name == '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: Setup MSVC
if: ${{ matrix.os.name == 'windows-latest' }}
uses: ilammy/msvc-dev-cmd@v1

- name: moon version
run: |
moon version --all
moonrun --version

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

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

- name: moon info
run: |
moon info
git diff --exit-code

- name: format diff
run: |
moon fmt
git diff --exit-code

coverage-check-bleeding:
runs-on: macos-14
continue-on-error: true
Expand Down
2 changes: 1 addition & 1 deletion fs/internal/ffi/native_stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ void remove_file(struct moonbit_bytes* path) {

void write_bytes_to_file(struct moonbit_bytes* path, struct moonbit_bytes* content) {
FILE *file = fopen((const char *)(path->data), "wb");
size_t content_size = moonbit_array_length(content);
size_t content_size = Moonbit_array_length(content);
fwrite(content->data, 1, content_size, file);
fflush(file);
fclose(file);
Expand Down
Loading