Skip to content

Update pipeline to build with conan2 #586

Update pipeline to build with conan2

Update pipeline to build with conan2 #586

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: |
python3 -m venv ${{ github.workspace }}/build_env
source ${{ github.workspace }}/build_env/bin/activate
pip3 install wheel setuptools numpy
pip3 install -r ${{ github.workspace }}/pagoda/requirements.txt
- 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: |
source ${{ github.workspace }}/build_env/bin/activate
${{ matrix.config.set_path }}
pushd ${{ github.workspace }}/pagoda
git submodule update --init --recursive
popd
conan install --profile:build=${{ github.workspace}}/pagoda/${{ matrix.config.conan_profile }} --profile:host=${{ github.workspace}}/pagoda/${{ matrix.config.conan_profile }} -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