Cargo Build Publish #1
This file contains 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: Cargo Build Publish | |
on: [workflow_dispatch] | |
jobs: | |
cargo-build-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install latests stable Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
architecture: x64 | |
- name: Install deps | |
run: pip install numpy pandas seaborn xgboost=='1.6.1' scikit-learn toml | |
- run: | | |
cp README.md py-forust/README.md | |
cp LICENSE py-forust/LICENSE | |
- name: Update TOML | |
run: python scripts/remove-optional-deps.py | |
- name: Build test data | |
run: python scripts/make_resources.py | |
- name: Run tests | |
run: cargo test --verbose | |
- name: Publish Crate | |
run: cargo publish --token ${CRATES_TOKEN} --allow-dirty | |
env: | |
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }} |