Semi rewrite #54
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: Build | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: "-Dwarnings" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup rust | |
| run: rustup toolchain install stable | |
| - name: Install Lua | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends liblua5.4-dev | |
| - name: Check formatting | |
| run: cargo fmt --check --all | |
| - name: Check Clippy | |
| run: cargo clippy --workspace --all-targets --features wasm,lua54 | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup rust | |
| run: rustup toolchain install stable | |
| - name: Install nextest to run tests | |
| uses: taiki-e/install-action@nextest | |
| - name: Build | |
| run: cargo build | |
| - name: Run tests | |
| run: cargo nextest run | |
| env: | |
| CORN_TEST: bar | |
| build-wasm: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup rust | |
| run: rustup toolchain install stable | |
| - name: Install wasm-pack | |
| run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
| - name: Build | |
| run: cargo build --features wasm | |
| - name: Wasm-Pack Test | |
| run: wasm-pack test --node --features wasm | |
| build-lua: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| lua: [lua51, lua52, lua53, lua54, luajit, luajit52] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup rust | |
| run: rustup toolchain install stable | |
| - name: Install Lua | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends liblua5.4-dev liblua5.3-dev liblua5.2-dev liblua5.1-0-dev libluajit-5.1-dev | |
| - name: Build | |
| run: cargo build --features ${{ matrix.lua }} |