Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
andykswong committed Mar 11, 2024
1 parent 97e5818 commit aa2856d
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 33 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: build
on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
Expand All @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '20'
node-version: "20"
- run: cargo build --release --verbose
- run: cargo test --verbose --all-features
- run: cargo test --verbose --no-default-features --features libm
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
name: pages
on:
push:
branches: [ main ]
branches: [main]
jobs:
build_gh_pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- run: npm ci --ignore-scripts
- run: npm run docs -- --excludeInternal
- name: Copy files to public
run: cp -r ./docs ./public
- name: Deploy public
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "20"
- run: npm ci --ignore-scripts
- run: npm run docs -- --excludeInternal
- name: Copy files to public
run: cp -r ./docs ./public
- name: Deploy public
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
18 changes: 9 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ jobs:
npm_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org'
- run: npm ci --ignore-scripts
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
- run: npm ci --ignore-scripts
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ serde = { version = "1.0", optional = true, default-features = false, features =
[dev-dependencies]
serde_json = "1.0"

[lib]
crate-type = ["cdylib", "rlib"]

[profile.release]
lto = true
opt-level = "z"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"scripts": {
"prepublishOnly": "npm run build && npm test && npm run docs",
"clean": "rimraf coverage/ docs/ dist/ target/ **/__tests__/**/*.spec.map **/__tests__/**/*.spec.wat",
"build:rust": "cargo build --release --target wasm32-unknown-unknown --features jsmath,wasm --no-default-features",
"build:rust": "cargo rustc -r --target wasm32-unknown-unknown --crate-type cdylib -F jsmath,wasm --no-default-features",
"postbuild:rust": "wasm-opt -Oz -o dist/munum.wasm target/wasm32-unknown-unknown/release/munum.wasm",
"prebuild": "npm run lint",
"build": "npm run tsc",
Expand Down
2 changes: 1 addition & 1 deletion src/float.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub trait FloatOps: Copy {
fn tan(self) -> Self;
}

#[cfg(all(any(feature = "std", feature = "libm"), not(feature = "jsmath")))]
#[cfg(all(any(feature = "std", feature = "libm"), not(all(target_arch = "wasm32", feature = "jsmath"))))]
impl<T: num::traits::Float> FloatOps for T {
#[inline]
fn acos(self) -> T {
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Micro Library for 3D Math
#![no_std]
#![cfg_attr(not(test), no_std)]

#[cfg(test)]
extern crate alloc;
Expand All @@ -9,8 +9,8 @@ extern crate alloc;
extern crate std;

mod matrix;
mod matrix_special;
mod matrix_ops;
mod matrix_special;
mod quat;

pub mod float;
Expand Down

0 comments on commit aa2856d

Please sign in to comment.