Skip to content

Commit

Permalink
Force cmake version when build ONNX Runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
ia0 committed Jan 21, 2025
1 parent 061fa35 commit 3eaf845
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/python-build-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
path: rust/onnx/runtime/build/Linux
key: maturin-${{ matrix.platform.target }}-${{ hashFiles('rust/onnx/build.sh') }}
- run: python3 ./python/scripts/fix_package_version.py
- if: matrix.platform.runner == 'ubuntu-latest'
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update -y
sudo apt-get install gcc-13 g++-13
- if: matrix.platform.runner == 'ubuntu-latest'
name: Build wheels
uses: PyO3/maturin-action@v1
Expand Down Expand Up @@ -75,8 +80,11 @@ jobs:
- run: magika --version
- run: python3 -c 'import magika; print(magika.__version__)'
- run: magika -r tests_data/basic
# TODO(https://github.com/google/magika/issues/892): Remove the 2 continue-on-error.
- run: python3 ./python/scripts/run_quick_test_magika_cli.py
continue-on-error: ${{ matrix.platform.runner == 'windows-latest' }}
- run: python3 ./python/scripts/run_quick_test_magika_module.py
continue-on-error: ${{ matrix.platform.runner == 'windows-latest' }}
- name: Upload wheels
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
Expand Down
10 changes: 10 additions & 0 deletions rust/onnx/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ else
info "Checkout v1.20.0 because that's what ort v2.0.0-rc.9 supports."
git checkout v1.20.0

# The build fails with GCC 14, so we use GCC 13 (setup in workflow).
export CC=/opt/rh/gcc-toolset-13/root/usr/bin/gcc
export CXX=/opt/rh/gcc-toolset-13/root/usr/bin/g++
# DEBUG
set -x
which gcc || true
which g++ || true
which gcc-13 || true
which g++-13 || true

info "Build the static libraries."
x ./build.sh --config=Release --parallel $ONNX_RUNTIME_BUILD_FLAGS

Expand Down

0 comments on commit 3eaf845

Please sign in to comment.