efrc #132
Workflow file for this run
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: General | |
on: | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
version: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: get | |
id: last_release | |
uses: InsonusK/get-latest-release@v1.1.0 | |
with: | |
myToken: ${{ github.token }} | |
view_top: 1 | |
- name: rust | |
run: | | |
pip install packaging | |
export LATEST_VERSION=$(echo ${{ steps.last_release.outputs.tag_name }} | cut -d v -f 2) | |
echo "latest tag is ${LATEST_VERSION}" | |
export CURRENT_VERSION_RUST=$(grep -m 1 version Cargo.toml | cut -d '"' -f 2) | |
echo "rust version in PR is ${CURRENT_VERSION_RUST}" | |
export CHECK=$(python -c 'from packaging.version import parse; print(parse("'${CURRENT_VERSION_RUST}'") > parse("'${LATEST_VERSION}'"))' | tr '[:upper:]' '[:lower:]') | |
$CHECK | |
- name: julia | |
run: | | |
export LATEST_VERSION=$(echo ${{ steps.last_release.outputs.tag_name }} | cut -d v -f 2) | |
echo "latest tag is ${LATEST_VERSION}" | |
export CURRENT_VERSION_JULIA=$(grep -m 1 version Project.toml | cut -d '"' -f 2) | |
echo "julia version in PR is ${CURRENT_VERSION_JULIA}" | |
export CHECK=$(python -c 'from packaging.version import parse; print(parse("'${CURRENT_VERSION_JULIA}'") > parse("'${LATEST_VERSION}'"))' | tr '[:upper:]' '[:lower:]') | |
$CHECK | |
- name: both | |
run: | | |
export CURRENT_VERSION_RUST=$(grep -m 1 version Cargo.toml | cut -d '"' -f 2) | |
echo "rust version in PR is ${CURRENT_VERSION_RUST}" | |
export CURRENT_VERSION_JULIA=$(grep -m 1 version Project.toml | cut -d '"' -f 2) | |
echo "julia version in PR is ${CURRENT_VERSION_JULIA}" | |
export CHECK=$(python -c 'from packaging.version import parse; print(parse("'${CURRENT_VERSION_RUST}'") == parse("'${CURRENT_VERSION_JULIA}'"))' | tr '[:upper:]' '[:lower:]') | |
$CHECK | |
concurrency: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: maturin | |
run: | | |
pip install maturin | |
maturin build --features python | |
pip install target/wheels/*.whl | |
- name: tests | |
run: | | |
pip install pytest | |
pytest --quiet --compare . |