Skip to content

Update RUST_TOOLCHAIN version to 1.68 in GitHub Actions workflow #107

Update RUST_TOOLCHAIN version to 1.68 in GitHub Actions workflow

Update RUST_TOOLCHAIN version to 1.68 in GitHub Actions workflow #107

Workflow file for this run

name: Test
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
env:
RUST_TOOLCHAIN: 1.68
CMAKE_VERSION: 3.24
PYTHON_VERSION: 3.8
jobs:
test:
name: Test
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
runs-on:
- buildjet-4vcpu-ubuntu-2204-arm
- macos-latest-xlarge
- macos-latest
- ubuntu-latest
- windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- name: Setup CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: ${{ env.CMAKE_VERSION }}
- name: Setup Python
id: setup-python
continue-on-error: true
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Python (Linux)
if: runner.os == 'Linux' && steps.setup-python.outcome == 'failure'
run: |
sudo apt-get update -q -y
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get install -q -y \
python${{ env.PYTHON_VERSION }} \
python${{ env.PYTHON_VERSION }}-distutils \
python${{ env.PYTHON_VERSION }}-venv
sudo update-alternatives --install /usr/bin/python python /usr/bin/python${{ env.PYTHON_VERSION }} 1
- name: Install Python (macOS)
if: runner.os == 'macOS' && steps.setup-python.outcome == 'failure'
run: |
brew install python@${{ env.PYTHON_VERSION }}
echo /opt/homebrew/opt/python@${{ env.PYTHON_VERSION }}/libexec/bin >> $GITHUB_PATH
- name: Install Poetry
uses: abatilo/actions-poetry@v2
- name: Test `ort-cpp/test-model-generator`
working-directory: ort-cpp/test-model-generator
run: |
poetry install
poetry run python .
- name: Test `tflite-cpp/test-model-generator`
working-directory: tflite-cpp/test-model-generator
run: |
poetry install
poetry run python .
- name: Test workspace
run: cargo test --workspace --release