Skip to content

Commit

Permalink
assets.yml: export PATH and clean Conan cache for the self-hosted run…
Browse files Browse the repository at this point in the history
…ner jobs.

test.yml: use gcc for the cpp-linux-arm64 job.
Add tests-debug-gcc-linux-arm64 and tests-release-gcc-linux-arm64 Conan profiles.
  • Loading branch information
rturrado committed Dec 19, 2023
1 parent 64a654d commit 9778acf
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 23 deletions.
31 changes: 12 additions & 19 deletions .github/workflows/assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,14 @@ jobs:
- name: Install dependencies
run: |
dnf install -y $SWIG_VERSION
python_bin="/opt/python/${{ matrix.cpython_version }}/bin/python"
${python_bin} -m pip install --upgrade conan wheel auditwheel
pip_installation_folder=$(${python_bin} -m pip show --files conan | grep 'Location:' | sed 's/Location: //')
conan_installation_folder_relative_path=$(${python_bin} -m pip show --files conan | grep '/bin/' | sed 's#\s\+\(.*\)/conan#\1#')
conan_installation_folder="${pip_installation_folder}/${conan_installation_folder_relative_path}"
echo "Conan installation folder: ${conan_installation_folder}"
echo "${conan_installation_folder}" >> $GITHUB_PATH
export PATH="/opt/python/${{ matrix.cpython_version }}/bin:$PATH"
python -m pip install --upgrade conan wheel auditwheel
- name: Build wheel
run: |
/opt/python/${{ matrix.cpython_version }}/bin/python setup.py bdist_wheel
/opt/python/${{ matrix.cpython_version }}/bin/python -m auditwheel repair pybuild/dist/*.whl
export PATH="/opt/python/${{ matrix.cpython_version }}/bin:$PATH"
conan remove -c "*/*"
python setup.py bdist_wheel
python -m auditwheel repair pybuild/dist/*.whl
- name: Wheel path
id: wheel
working-directory: wheelhouse
Expand Down Expand Up @@ -149,18 +146,14 @@ jobs:
- name: Install dependencies
run: |
dnf install -y $BISON_VERSION $FLEX_VERSION $JAVA_VERSION $SWIG_VERSION
python_bin="/opt/python/${{ matrix.cpython_version }}/bin/python"
${python_bin} -m pip install --upgrade pip conan wheel auditwheel
pip_installation_folder=$(${python_bin} -m pip show --files conan | grep 'Location:' | sed 's/Location: //')
conan_installation_folder_relative_path=$(${python_bin} -m pip show --files conan | grep '/bin/' | sed 's#\s\+\(.*\)/conan#\1#')
conan_installation_folder="${pip_installation_folder}/${conan_installation_folder_relative_path}"
echo "Conan installation folder: ${conan_installation_folder}"
echo "${conan_installation_folder}" >> $GITHUB_PATH
export PATH="/opt/python/${{ matrix.cpython_version }}/bin:$PATH"
python -m pip install --upgrade pip conan wheel auditwheel
- name: Build wheel
run: |
conan remove -c "libqasm/*"
/opt/python/${{ matrix.cpython_version }}/bin/python setup.py bdist_wheel
/opt/python/${{ matrix.cpython_version }}/bin/python -m auditwheel repair pybuild/dist/*.whl
export PATH="/opt/python/${{ matrix.cpython_version }}/bin:$PATH"
conan remove -c "*/*"
python setup.py bdist_wheel
python -m auditwheel repair pybuild/dist/*.whl
- name: Wheel path
id: wheel
working-directory: wheelhouse
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,8 @@ jobs:
conan_profile: tests-${{ matrix.build_type }}-msvc-windows-x64
shell: bash

# We are observing an internal compiler error when building with gcc
# So we are changing to clang for the Linux/ARM64 builds
cpp-linux-arm64:
name: "C++ tests (clang/Linux/ARM64)"
name: "C++ tests (gcc/Linux/ARM64)"
runs-on: [self-hosted, ARM64, Linux]
container: python:3.11
strategy:
Expand All @@ -92,7 +90,7 @@ jobs:
- uses: ./.github/actions/cpp-tests
with:
build_type: ${{ matrix.build_type }}
conan_profile: tests-${{ matrix.build_type }}-clang-linux-arm64
conan_profile: tests-${{ matrix.build_type }}-gcc-linux-arm64
shell: bash

cpp-macos-arm64:
Expand Down
1 change: 1 addition & 0 deletions conan/profiles/tests-debug-gcc-linux-arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include(tests-debug)
4 changes: 4 additions & 0 deletions conan/profiles/tests-release-gcc-linux-arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include(tests-release)

[conf]
tools.build:cxxflags=["-Wno-error=maybe-uninitialized"]

0 comments on commit 9778acf

Please sign in to comment.