Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Young-Flash committed Jan 22, 2025
1 parent 178288d commit d9ea73e
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
29 changes: 28 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ jobs:
run: |
moon test --target all
moon test --release --target all
moon test --target native --build-only
ls ./target/native/debug/test/sync_io
moon test --target native
- name: moon test --doc
Expand Down Expand Up @@ -208,6 +210,8 @@ jobs:
run: |
moon test --target all
moon test --release --target all
moon test --target native --build-only
ls ./target/native/debug/test/sync_io
moon test --target native
- name: moon test --doc
Expand Down Expand Up @@ -239,16 +243,25 @@ jobs:
continue-on-error: true
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
os: [macos-latest, ubuntu-latest, windows-latest, macos-13]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: install
if: ${{ matrix.os != '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 == '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
Expand All @@ -258,13 +271,27 @@ jobs:
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
if: ${{ matrix.os == 'windows-latest' }}
run: |
moon test --target all
moon test --release --target all
moon test --target native --build-only
ls ./target/native/debug/test/sync_io
moon test --target native
- name: moon test --doc
run: |
moon test --doc
Expand Down
5 changes: 5 additions & 0 deletions sync_io/moon.pkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,10 @@
"sync_io_js.mbt": ["js"],
"sync_io_native.mbt": ["native"],
"util.mbt": ["wasm", "wasm-gc"]
},
"link": {
"native": {
"cc-flags": "-O2"
}
}
}
4 changes: 3 additions & 1 deletion sync_io/sync_io.mbti
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ fn read_file_to_bytes(path~ : String) -> Bytes!
fn write_bytes_to_file(path~ : String, content~ : Bytes) -> Unit

// Types and methods
type IOError
pub type! IOError {
NotFound(String)
}

// Type aliases

Expand Down

0 comments on commit d9ea73e

Please sign in to comment.