Skip to content

add reaper pathing override param to maps #5

add reaper pathing override param to maps

add reaper pathing override param to maps #5

Workflow file for this run

name: RustBuild
on: [push, pull_request]
jobs:
build:
name: Build release
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [stable]
python-version: ['3.9', '3.10', '3.11']
steps:
# https://github.com/actions-rs/toolchain
- uses: actions/checkout@v1
# Cache
- name: Cache cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v2
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- uses: dtolnay/rust-toolchain@stable
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
- name: Run clippy
run: |
rustup component add clippy
cargo clippy
- name: Test
run: cargo test --verbose --no-default-features
- name: Build
run: cargo build --verbose --release
- name: Create artifact directory
run: mkdir artifacts
# Create venv
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: x64
command: build
manylinux: auto
args: --release --interpreter ${{ matrix.python-version }} --out dist
- name: Install built wheel
run: |
python -m pip install sc2pathlib --target=sc2pathlib_dist --no-index --find-links dist --force-reinstall
# See - https://github.com/actions/upload-artifact/issues/39
- uses: actions/upload-artifact@v3
name: Upload archive
with:
name: ${{ matrix.os }}_python${{ matrix.python-version }}
path: sc2pathlib_dist/
benchmark:
name: Performance regression check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Cache
- name: Cache cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v2
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
# Run benchmark with `go test -bench` and stores the output to a file
- name: Run benchmark
run: cargo bench --bench path_benchmark --no-default-features -- --output-format bencher | tee output.txt
# Download previous benchmark result from cache (if exists)
- name: Download previous benchmark data
uses: actions/cache@v2
with:
path: ./cache
key: ${{ runner.os }}-benchmark
# Run `github-action-benchmark` action
- name: Store benchmark result
uses: rhysd/github-action-benchmark@v1
with:
name: Rust Benchmark
# What benchmark tool the output.txt came from
tool: 'cargo'
github-token: ${{ secrets.GITHUB_TOKEN }}
# Where the output from the benchmark tool is stored
output-file-path: output.txt
# Where the previous data file is stored
external-data-json-path: ./cache/benchmark-data.json
# Workflow will fail when an alert happens
fail-on-alert: true
comment-always: true
# Upload the updated cache file for the next job by actions/cache