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

fix: ci #69

Merged
merged 3 commits into from
Aug 14, 2024
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
5 changes: 5 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,13 @@ jobs:
python-version: '3.12'

- name: Install NumPy
if: ${{ matrix.os != 'macos-latest' }}
run: python3 -m pip install numpy

- name: Install NumPy on MacOs
if: ${{ matrix.os == 'macos-latest' }}
run: python3 -m pip install --user --break-system-packages numpy

- name: Run deno test
run: deno task test

Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ plt.plot(xpoints, ypoints);
plt.show();
```

When running, you **must** specify `--allow-ffi`, `--allow-env` and `--unstable`
flags. Alternatively, you may also just specify `-A` instead of specific
permissions since enabling FFI effectively escapes the permissions sandbox.
When running, you **must** specify `--allow-ffi`, `--allow-env` and
`--unstable-ffi` flags. Alternatively, you may also just specify `-A` instead of
specific permissions since enabling FFI effectively escapes the permissions
sandbox.

```shell
deno run -A --unstable <file>
deno run -A --unstable-ffi <file>
```

### Usage in Bun
Expand Down
18 changes: 9 additions & 9 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"tasks": {
"check": "deno task check:mod && deno task check:ext && deno task check:examples",
"check:mod": "deno check --unstable mod.ts",
"check:ext": "deno check --unstable ext/*.ts",
"check:examples": "deno check --unstable examples/*.ts",
"test": "deno test --unstable -A test/test.ts",
"example:hello_python": "deno run -A --unstable examples/hello_python.ts",
"example:matplotlib": "deno run -A --unstable examples/matplotlib.ts",
"example:pip_import": "deno run -A --unstable examples/pip_import.ts",
"example:run_code": "deno run -A --unstable examples/run_code.ts",
"example:tensorflow": "deno run -A --unstable examples/tensorflow.ts"
"check:mod": "deno check --unstable-ffi mod.ts",
"check:ext": "deno check --unstable-ffi ext/*.ts",
"check:examples": "deno check --unstable-ffi examples/*.ts",
"test": "deno test --unstable-ffi -A test/test.ts",
"example:hello_python": "deno run -A --unstable-ffi examples/hello_python.ts",
"example:matplotlib": "deno run -A --unstable-ffi examples/matplotlib.ts",
"example:pip_import": "deno run -A --unstable-ffi examples/pip_import.ts",
"example:run_code": "deno run -A --unstable-ffi examples/run_code.ts",
"example:tensorflow": "deno run -A --unstable-ffi examples/tensorflow.ts"
}
}
2 changes: 1 addition & 1 deletion src/ffi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ for (const path of searchPath) {
} catch (err) {
if (err instanceof TypeError && !("Bun" in globalThis)) {
throw new Error(
"Cannot load dynamic library because --unstable flag was not set",
"Cannot load dynamic library because --unstable-ffi flag was not set",
{ cause: err },
);
}
Expand Down
Loading