Skip to content

Iterate over B and Z properly #655

Iterate over B and Z properly

Iterate over B and Z properly #655

Workflow file for this run

name: Test ext
on: [push, pull_request]
jobs:
test:
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository }}
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: 1
RUSTFLAGS: "-D warnings"
RUSTUP_TOOLCHAIN: ${{ matrix.toolchain }}
strategy:
matrix:
toolchain: ["stable", "beta", "nightly"]
continue-on-error: ${{ matrix.toolchain != 'stable' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install rustup
id: rustup
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
- name: Cache files
uses: actions/cache@v4
with:
path: |
~/.cargo
/usr/share/rust/.cargo
**/target
key: test-${{ steps.rustup.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.*') }}
- name: Install testing requirements
run: pip install pytest
- name: Run ext tests
run: make -C ext test
- name: Run ext examples
run: make -C ext benchmarks
- name: Run ext examples (nassau)
run: make -C ext benchmarks-nassau
- name: Run ext examples (concurrent)
run: make -C ext benchmarks-concurrent
- name: Benchmark executable size
run: |
ls -l ext/target/debug/examples | grep -v ' .*-\|\.d$'
miri:
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository }}
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: 1
RUSTFLAGS: "-D warnings -A stable-features"
RUSTUP_TOOLCHAIN: nightly
steps:
- uses: actions/checkout@v4
- name: Install rustup
id: rustup
uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
components: miri
- name: Cache files
uses: actions/cache@v4
with:
path: |
~/.cargo
/usr/share/rust/.cargo
**/target
key: miri-${{ steps.rustup.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.*') }}
- name: Run miri
run: make -C ext miri
lint:
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository }}
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: 1
RUSTFLAGS: "-D warnings"
RUSTUP_TOOLCHAIN: nightly
steps:
- uses: actions/checkout@v4
- name: Install rustup
id: rustup
uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
components: clippy, rustfmt
- name: Install python dependencies
run: sudo apt-get install black flake8
- name: Cache files
uses: actions/cache@v4
with:
path: |
~/.cargo
/usr/share/rust/.cargo
**/target
key: lint-${{ steps.rustup.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.*') }}
- name: Run lint
run: make -C ext lint
- name: Lint sseq_gui
run: make -C web_ext/sseq_gui lint
- name: Lint sseq_gui tests
run: make -C web_ext/sseq_gui lint-selenium
webserver:
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository }}
runs-on: ubuntu-20.04
env:
RUST_BACKTRACE: 1
RUSTFLAGS: "-D warnings"
RUSTUP_TOOLCHAIN: ${{ matrix.toolchain }}
strategy:
matrix:
toolchain: ["stable", "beta", "nightly"]
continue-on-error: ${{ matrix.toolchain != 'stable' }}
steps:
- uses: actions/checkout@v4
- name: Install rustup
uses: dtolnay/rust-toolchain@v1
id: rustup
with:
toolchain: ${{ matrix.toolchain }}
targets: wasm32-unknown-unknown
components: clippy, rustfmt
- name: Cache files
uses: actions/cache@v4
with:
path: |
~/.cargo
/usr/share/rust/.cargo
**/target
key: wasm-${{ steps.rustup.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.*') }}
- name: Install wasm-opt
run: sudo apt-get install binaryen
- name: Setup build environment
run: make -C web_ext/sseq_gui setup-wasm
- name: Lint sseq_gui wasm
run: make -C web_ext/sseq_gui lint-wasm
- name: Build wasm
run: make -C web_ext/sseq_gui wasm
- name: Benchmark wasm size
run: ls -l web_ext/sseq_gui/dist/sseq_gui_wasm_bg.wasm
- name: Upload webserver
uses: actions/upload-artifact@v4
with:
name: webserver-${{ matrix.toolchain }}
path: web_ext/sseq_gui/dist/
selenium:
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository }}
runs-on: ubuntu-20.04
timeout-minutes: 10
needs: [webserver]
env:
RUST_BACKTRACE: 1
RUSTFLAGS: "-D warnings"
RUSTUP_TOOLCHAIN: ${{ matrix.toolchain }}
strategy:
matrix:
toolchain: ["stable", "beta", "nightly"]
defaults:
run:
working-directory: web_ext/sseq_gui
continue-on-error: ${{ matrix.toolchain != 'stable' }}
steps:
- uses: actions/checkout@v4
- name: Download webserver
uses: actions/download-artifact@v4
with:
name: webserver-beta
path: web_ext/sseq_gui/dist/
- name: Install rustup
uses: dtolnay/rust-toolchain@v1
id: rustup
with:
toolchain: ${{ matrix.toolchain }}
- name: Install dependencies
run: sudo apt-get install --no-install-recommends python3-pytest python3-selenium
- name: Cache files
uses: actions/cache@v4
with:
path: |
~/.cargo
/usr/share/rust/.cargo
**/target
key: webserver-${{ steps.rustup.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.*') }}
- name: Test wasm
run: |
make serve-wasm &
(sleep 1 && make selenium)
- name: Test local
run: |
cargo build &&
(target/debug/sseq_gui &
(sleep 1 && make selenium))
- name: Test local concurrent
run: |
cargo build --features concurrent &&
(target/debug/sseq_gui &
(sleep 1 && make selenium))
- name: Upload Artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: svg-changes-${{ matrix.toolchain }}
path: web_ext/sseq_gui/tests/benchmarks/*-new.svg
calculator:
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository }}
runs-on: ubuntu-20.04
env:
RUST_BACKTRACE: 1
RUSTFLAGS: "-D warnings"
RUSTUP_TOOLCHAIN: ${{ matrix.toolchain }}
strategy:
matrix:
toolchain: ["stable", "beta", "nightly"]
continue-on-error: ${{ matrix.toolchain != 'stable' }}
steps:
- uses: actions/checkout@v4
- name: Install rustup
id: rustup
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
targets: wasm32-unknown-unknown
components: clippy, rustfmt
- name: Cache files
uses: actions/cache@v4
with:
path: |
~/.cargo
/usr/share/rust/.cargo
**/target
key: calculator-${{ steps.rustup.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.*') }}
- name: Install wasm-opt
run: sudo apt-get install binaryen
- name: Setup build environment
run: make -C web_ext/steenrod_calculator setup-wasm
- name: Lint sseq_gui wasm
run: make -C web_ext/steenrod_calculator lint
- name: Build wasm
run: make -C web_ext/steenrod_calculator
- name: Benchmark wasm size
run: ls -l web_ext/steenrod_calculator/dist/steenrod_calculator_wasm_bg.wasm
- name: Upload calculator
uses: actions/upload-artifact@v4
with:
name: calculator-${{ matrix.toolchain }}
path: web_ext/steenrod_calculator/dist/
docs:
if: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository }}
runs-on: ubuntu-20.04
env:
RUST_BACKTRACE: 1
RUSTFLAGS: "-D warnings"
RUSTUP_TOOLCHAIN: ${{ matrix.toolchain }}
strategy:
matrix:
toolchain: ["stable", "beta", "nightly"]
continue-on-error: ${{ matrix.toolchain != 'stable' }}
steps:
- uses: actions/checkout@v4
- name: Install rustup
id: rustup
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
- name: Cache files
uses: actions/cache@v4
with:
path: |
~/.cargo
/usr/share/rust/.cargo
**/target
key: docs-${{ steps.rustup.outputs.rustc_hash }}-${{ hashFiles('ext/Cargo.*') }}
- name: Generate docs
run: make -C ext docs
- name: Upload docs
uses: actions/upload-artifact@v4
with:
name: docs-${{ matrix.toolchain }}
path: ext/target/doc/
deploy:
needs: [test, lint, webserver, calculator, docs, selenium]
runs-on: ubuntu-20.04
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
steps:
- name: Download webserver
uses: actions/download-artifact@v4
with:
name: webserver-stable
- name: Download calculator
uses: actions/download-artifact@v4
with:
name: calculator-stable
path: calculator
- name: Download docs
uses: actions/download-artifact@v4
with:
name: docs-stable
path: docs
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
full_commit_message: ${{ github.event.head_commit.message }}