Skip to content

Update pipeline to build with conan2 #578

Update pipeline to build with conan2

Update pipeline to build with conan2 #578

Workflow file for this run

name: Build
on: push
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Ubuntu-gcc",
os: ubuntu-latest,
set_path: "export PATH=$PATH:/home/runner/.local/bin",
conan_profile: './tools/profiles/ubuntu_gcc_Release_gh.txt',
cc: "gcc-9",
cxx: "g++-9"
}
- {
name: "macOs-clang",
os: macos-latest,
set_path: "",
conan_profile: './tools/profiles/macos_clang_Release_gh.txt',
cc: "clang",
cxx: "clang++"
}
- {
name: "Windows-msvc",
os: windows-2019,
set_path: "",
conan_profile: './tools/profiles/win_msvc_Release_gh.txt',
cc: "",
cxx: ""
}
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
path: 'pagoda'
- name: Download and Install Dependencies
run: |
pip3 install wheel setuptools numpy
pip3 install conan
- name: Download and Install Dependencies (Ubuntu)
if: ${{ contains(matrix.config.os, 'Ubuntu') }}
run: |
sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev build-essential
- name: Configure and Build
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
CONAN_SYSREQUIRES_MODE: "enabled"
run: |
${{ matrix.config.set_path }}
pushd ${{ github.workspace }}/pagoda
git submodule update --init --recursive
popd
conan install -of ${{ github.workspace }}/build ${{ github.workspace }}/pagoda --build=missing
cmake --preset conan-release
cmake --build ${{ github.workspace }}/build -j 24
- name: Run tests
run: |
cd build
ctest -C Release
- name: Pack Build Results
if: always()
shell: cmake -P {0}
run: |
execute_process(COMMAND ${CMAKE_COMMAND}
-E tar cJfv "build-results-${{ matrix.config.name }}.tar.xz" "./")
- name: Upload Build Results
if: always()
uses: actions/upload-artifact@v1
with:
path: ./build-results-${{ matrix.config.name }}.tar.xz
name: build-results-${{ matrix.config.name }}.tar.xz
- name: Install
run: |
mkdir -p ${{ github.workspace }}/install_dir
cmake --install ${{ github.workspace }}/build --prefix ${{ github.workspace }}/build/pagoda
- name: Pack
shell: cmake -P {0}
run: |
execute_process(COMMAND ${CMAKE_COMMAND}
-E tar cJfv "${{ matrix.config.name }}.tar.xz" "${{ github.workspace }}/build/pagoda")
- name: Upload
uses: actions/upload-artifact@v1
with:
path: ./${{ matrix.config.name }}.tar.xz
name: ${{ matrix.config.name }}.tar.xz