Skip to content

Possible CI fix for linux? #1390

Possible CI fix for linux?

Possible CI fix for linux? #1390

Workflow file for this run

name: Build Wheel
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Build ${{ matrix.os }} python ${{ matrix.python }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [openstack22]
python: ["3.12"]
timeout-minutes: 500
steps:
- name: add llvm
run: |
if [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
# add the ppa
sudo apt-get update
sudo apt-get install -y git gcc g++
#sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100
#sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 50
#sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100
#sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 50
#sudo update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-12 100
#sudo update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-11 50
#sudo update-alternatives --set g++ /usr/bin/g++-12
#sudo update-alternatives --set gcc /usr/bin/gcc-12
#sudo update-alternatives --set cpp-bin /usr/bin/cpp-12
#sudo python3 -m pip install --upgrade lit
#- run: python3 -m pip install --user numpy
fi
- uses: actions/checkout@v3
with:
submodules: recursive
- run: sudo rm -rf ~/.cache/bazel ~/.cache/bazelisk ~/.bazel/*
- name: Check compiler env and setup stuff
run: |
g++ --version
gcc --version
export CC=/usr/bin/gcc
export CXX=/usr/bin/g++
- uses: bazel-contrib/[email protected]
name: Set up Bazel
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
# disk-cache: ${{ github.workflow }}-${{ hashFiles('.github/workflows/build.yml') }}
# Share repository cache between workflows.
repository-cache: true
bazelisk-version: 1.x
- name: test
run: |
HERMETIC_PYTHON_VERSION=${{ matrix.python }} bazel test --define xnn_enable_avxvnni=false --define xnn_enable_avx512amx=false --test_output=errors ...
- name: Build Wheel
run: |
sudo rm bazel-bin/*.whl || echo
HERMETIC_PYTHON_VERSION=${{ matrix.python }} bazel build --define xnn_enable_avxvnni=false --define xnn_enable_avx512amx=false :wheel
cp bazel-bin/*.whl .
- name: Upload Build
uses: actions/upload-artifact@v3
with:
name: Wheel-${{ matrix.os }}
path: "*.whl"