glucose_rs as a submodule #716
Workflow file for this run
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: Run tests | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: {} | |
| schedule: | |
| - cron: "0 15 * * FRI" # weekly test: every Saturday 00:00 JST | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| styles: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup environment | |
| run: rustup update | |
| - name: Run rustfmt | |
| run: | | |
| rustup component add rustfmt | |
| ./format.sh --check | |
| python3 tools/check_puzzles_order.py | |
| python3 tools/add_backend_tests.py --check | |
| rust-x86-latest: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup environment | |
| run: rustup update | |
| - name: Build | |
| run: cargo build --verbose | |
| - name: Run tests | |
| run: cargo test --verbose | |
| rust-x86-latest-no-default-features: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup environment | |
| run: rustup update | |
| - name: Build | |
| run: cargo build --verbose --no-default-features | |
| - name: Run tests | |
| run: cargo test --verbose --no-default-features | |
| rust-wasm-latest: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22.x' | |
| - name: Setup environment | |
| run: | | |
| rustup target add wasm32-unknown-emscripten | |
| cd ${{ runner.temp }} | |
| git clone https://github.com/emscripten-core/emsdk.git | |
| cd emsdk | |
| ./emsdk install latest | |
| ./emsdk activate latest | |
| - name: Build | |
| run: | | |
| source ${{ runner.temp }}/emsdk/emsdk_env.sh | |
| cargo build --target wasm32-unknown-emscripten --verbose --no-default-features | |
| - name: Run tests | |
| run: | | |
| mkdir ${{ runner.temp }}/test | |
| cp target/wasm32-unknown-emscripten/debug/deps/cspuz_solver_backend.js ${{ runner.temp }}/test/cspuz_solver_backend.mjs | |
| cp target/wasm32-unknown-emscripten/debug/deps/cspuz_solver_backend.wasm ${{ runner.temp }}/test | |
| cp tests/test_cspuz_solver_backend.js ${{ runner.temp }}/test | |
| cd ${{ runner.temp }}/test | |
| node test_cspuz_solver_backend.js |