From 9778acf06feb11d418215e30fdfa9f2e8ecc0cb7 Mon Sep 17 00:00:00 2001 From: rturrado <68099809+rturrado@users.noreply.github.com> Date: Tue, 19 Dec 2023 19:57:40 +0100 Subject: [PATCH] assets.yml: export PATH and clean Conan cache for the self-hosted runner 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. --- .github/workflows/assets.yml | 31 ++++++++------------ .github/workflows/test.yml | 6 ++-- conan/profiles/tests-debug-gcc-linux-arm64 | 1 + conan/profiles/tests-release-gcc-linux-arm64 | 4 +++ 4 files changed, 19 insertions(+), 23 deletions(-) create mode 100644 conan/profiles/tests-debug-gcc-linux-arm64 create mode 100644 conan/profiles/tests-release-gcc-linux-arm64 diff --git a/.github/workflows/assets.yml b/.github/workflows/assets.yml index 93e7ba306..fa3f004da 100644 --- a/.github/workflows/assets.yml +++ b/.github/workflows/assets.yml @@ -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 @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 07d292e13..7c95fd073 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: @@ -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: diff --git a/conan/profiles/tests-debug-gcc-linux-arm64 b/conan/profiles/tests-debug-gcc-linux-arm64 new file mode 100644 index 000000000..281026434 --- /dev/null +++ b/conan/profiles/tests-debug-gcc-linux-arm64 @@ -0,0 +1 @@ +include(tests-debug) diff --git a/conan/profiles/tests-release-gcc-linux-arm64 b/conan/profiles/tests-release-gcc-linux-arm64 new file mode 100644 index 000000000..058c0f3a2 --- /dev/null +++ b/conan/profiles/tests-release-gcc-linux-arm64 @@ -0,0 +1,4 @@ +include(tests-release) + +[conf] +tools.build:cxxflags=["-Wno-error=maybe-uninitialized"]