Fix pypi aarch workflow #1268
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI - Linux/OSX/Windows - Conda | |
on: | |
push: | |
pull_request: | |
paths-ignore: | |
- CHANGELOG.md | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-with-conda: | |
name: '[conda:${{ matrix.os }}:${{ matrix.build_type }}:c++${{ matrix.cxx_std }}]' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: [Release, Debug] | |
name: [ubuntu-latest, macos-latest, windows-2019-clang-cl, windows-latest, macos-14] | |
cxx_std: [17, 20] | |
continue_on_error: [false] | |
include: | |
- name: ubuntu-latest | |
os: ubuntu-latest | |
- name: macos-latest | |
os: macos-latest | |
- name: macos-14 | |
os: macos-14 | |
# proxsuite doesn't build with vs2019, so we use clang-cl instead | |
- name: windows-2019-clang-cl | |
os: windows-2019 | |
compiler: clang-cl | |
# proxsuite should work with vs2022 | |
- name: windows-latest | |
os: windows-latest | |
compiler: cl | |
- name: macos-latest | |
os: macos-latest | |
build_type: Debug | |
cxx_std: 17 | |
continue_on_error: true | |
- name: macos-latest | |
os: macos-latest | |
build_type: Debug | |
cxx_std: 20 | |
continue_on_error: true | |
exclude: | |
- name: macos-latest | |
build_type: Debug | |
cxx_std: 17 | |
continue_on_error: false | |
- name: macos-latest | |
build_type: Debug | |
cxx_std: 20 | |
continue_on_error: false | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
activate-environment: proxsuite | |
environment-file: .github/workflows/conda/environment.yml | |
auto-activate-base: false | |
auto-update-conda: true | |
- name: Install dependencies [Conda/Windows-latest] | |
if: contains(matrix.os, 'windows-latest') | |
shell: bash -l {0} | |
run: | | |
# Use VS2022 on Windows-latest | |
conda install vs2022_win-64 | |
- name: Install julia [Linux] | |
if: contains(matrix.os, 'ubuntu') | |
shell: bash -l {0} | |
run: | | |
conda install julia | |
- name: Activate ccache [Conda] | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: ${{ matrix.os }}-${{ matrix.type }}-${{ matrix.cxx_std }} | |
max-size: 1G | |
- name: Print environment [Conda] | |
shell: bash -l {0} | |
run: | | |
conda info | |
conda list | |
env | |
- name: Configure [Conda/Linux&macOS] | |
if: contains(matrix.os, 'macos-') || contains(matrix.os, 'ubuntu') | |
shell: bash -l {0} | |
run: | | |
echo $(whereis ccache) | |
echo $(which ccache) | |
git submodule update --init | |
mkdir build | |
cd build | |
cmake .. -GNinja -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_STANDARD=${{ matrix.cxx_std }} -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_PYTHON_INTERFACE:BOOL=ON -DPYTHON_EXECUTABLE=$(which python3) -DBUILD_DOCUMENTATION:BOOL=ON -DINSTALL_DOCUMENTATION:BOOL=ON -DTEST_JULIA_INTERFACE:BOOL=OFF -DOpenMP_ROOT=$CONDA_PREFIX | |
- name: Configure [Conda/macOS-debug/CheckMalloc] | |
if: contains(matrix.os, 'macos-latest') && contains(matrix.build_type, 'Debug') | |
shell: bash -l {0} | |
run: | | |
echo $(whereis ccache) | |
echo $(which ccache) | |
cd build | |
cmake .. -GNinja -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCHECK_RUNTIME_MALLOC:BOOL=ON -DCMAKE_CXX_STANDARD=${{ matrix.cxx_std }} -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_PYTHON_INTERFACE:BOOL=ON -DPYTHON_EXECUTABLE=$(which python3) -DBUILD_DOCUMENTATION:BOOL=ON -DINSTALL_DOCUMENTATION:BOOL=ON -DTEST_JULIA_INTERFACE:BOOL=OFF -DBUILD_WITH_OPENMP_SUPPORT:BOOL=ON -DOpenMP_ROOT=$CONDA_PREFIX | |
- name: Configure [Conda/Windows] | |
if: contains(matrix.os, 'windows-') | |
# It's better to use CMD to have all VS variables setup | |
shell: cmd /C CALL {0} | |
run: | | |
git submodule update --init | |
mkdir build | |
cd build | |
set CC=${{ matrix.compiler }} | |
set CXX=${{ matrix.compiler }} | |
cmake .. -GNinja -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%/Library -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_STANDARD=${{ matrix.cxx_std }} -DBUILD_PYTHON_INTERFACE:BOOL=ON -DPYTHON_SITELIB=%CONDA_PREFIX%/Lib/site-packages -DPYTHON_EXECUTABLE=%CONDA_PREFIX%/python.exe -DOpenMP_ROOT=%CONDA_PREFIX% -DBUILD_WITH_OPENMP_SUPPORT:BOOL=ON -DLINK_PYTHON_INTERFACE_TO_OPENMP:BOOL=ON -DBUILD_DOCUMENTATION:BOOL=ON -DINSTALL_DOCUMENTATION:BOOL=ON | |
- name: Build [Conda/Linux&macOS] | |
if: contains(matrix.os, 'macos-') || contains(matrix.os, 'ubuntu') | |
shell: bash -l {0} | |
run: | | |
cd build | |
cmake --build . --config ${{ matrix.build_type }} -v -j 1 | |
- name: Build [Conda/Windows] | |
if: contains(matrix.os, 'windows-') | |
# It's better to use CMD to have all VS variables setup | |
shell: cmd /C CALL {0} | |
run: | | |
cd build | |
cmake --build . --config ${{ matrix.build_type }} -v -j 1 | |
- name: Build documentation [Conda] | |
shell: bash -l {0} | |
run: | | |
cd build | |
cmake --build . --config ${{ matrix.build_type }} --target doc | |
- name: Install [Conda] | |
shell: bash -l {0} | |
run: | | |
cd build | |
cmake --install . --config ${{ matrix.build_type }} | |
- name: Test [Conda] | |
continue-on-error: ${{ matrix.continue_on_error }} | |
shell: bash -l {0} | |
run: | | |
find $CONDA_PREFIX -name proxsuite* | |
python -c "import proxsuite" | |
cd build | |
ctest --output-on-failure -C ${{ matrix.build_type }} | |
# - name: Test pkg-config [Conda] | |
# shell: bash -l {0} | |
# run: | | |
# cd build | |
# export PKG_CONFIG_PATH=$CONDA_PREFIX/lib/pkgconfig | |
# pkg-config --cflags proxsuite | |
# g++ -std=c++17 examples/cpp/overview-simple.cpp -o overview-simple $(pkg-config --cflags proxsuite) | |
# ./overview-simple | |
- name: Test CMake packaging [Conda/Linux&macOS] | |
if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu') | |
shell: bash -l {0} | |
run: | | |
cd test/packaging/cmake | |
mkdir build && cd build | |
cmake .. -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DPACKAGE_PREFIX_DIR=${CONDA_PREFIX} | |
cmake --build . --config ${{ matrix.build_type }} --target all | |
./run-proxqp | |
- name: Uninstall [Conda] | |
shell: bash -l {0} | |
run: | | |
cd build | |
cmake --build . --config ${{ matrix.build_type }} --target uninstall | |
- name: Display ccache statistics [Conda] | |
shell: bash -l {0} | |
run: | | |
echo $(ccache -s) | |
check: | |
if: always() | |
name: check-ci-linux-osx-win-conda | |
needs: | |
- build-with-conda | |
runs-on: Ubuntu-latest | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |