Skip to content

Commit

Permalink
Add conan step in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
LesleyLai committed Jun 11, 2023
1 parent f5e84a9 commit 13539da
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 31 deletions.
67 changes: 36 additions & 31 deletions .github/workflows/Ubuntu.yml
Expand Up @@ -29,39 +29,44 @@ jobs:
config: "Release"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Install CUDA
env:
cuda: ${{ matrix.cuda }}
run: ./scripts/actions/install_cuda_ubuntu.sh
shell: bash
- name: Install CUDA
env:
cuda: ${{ matrix.cuda }}
run: ./scripts/actions/install_cuda_ubuntu.sh
shell: bash

# Specify the correct host compilers
- name: Install/Select gcc and g++
run: |
sudo apt-get install -y gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }} libgl1-mesa-dev libglu1-mesa-dev
echo "CC=/usr/bin/gcc-${{ matrix.gcc }}" >> $GITHUB_ENV
echo "CXX=/usr/bin/g++-${{ matrix.gcc }}" >> $GITHUB_ENV
echo "CUDAHOSTCXX=/usr/bin/g++-${{ matrix.gcc }}" >> $GITHUB_ENV
# Specify the correct host compilers
- name: Install/Select gcc and g++
run: |
sudo apt-get install -y gcc-${{ matrix.gcc }} g++-${{ matrix.gcc }} libgl1-mesa-dev libglu1-mesa-dev
echo "CC=/usr/bin/gcc-${{ matrix.gcc }}" >> $GITHUB_ENV
echo "CXX=/usr/bin/g++-${{ matrix.gcc }}" >> $GITHUB_ENV
echo "CUDAHOSTCXX=/usr/bin/g++-${{ matrix.gcc }}" >> $GITHUB_ENV
- name: Create Build Environment
run: |
python3 -m pip install --upgrade pip setuptools
python3 -m pip install cmake
- name: Install conan
shell: bash
run: |
python3 -m pip install conan
- name: Create Build Environment
run: |
python3 -m pip install --upgrade pip setuptools
python3 -m pip install cmake
- name: Install conan
shell: bash
run: |
python3 -m pip install conan
- name: Configure cmake
id: configure
run: cmake . -B ${{ env.build_dir }} -DCMAKE_BUILD_TYPE=${{ env.config }}
- name: Run conan
shell: bash
run: |
conan install . --output-folder=${{ env.build_dir }} --build=missing
- name: Configure Error Processing
if: ${{ failure() && steps.configure.outcome == 'failure' }}
working-directory: ${{ env.build_dir }}
run: |
- name: Configure cmake
id: configure
run: cmake . -B ${{ env.build_dir }} -DCMAKE_BUILD_TYPE=${{ env.config }}

- name: Configure Error Processing
if: ${{ failure() && steps.configure.outcome == 'failure' }}
working-directory: ${{ env.build_dir }}
run: |
if [[ -f "CMakeFiles/CMakeOutput.log" ]]; then
echo "---- CMakeFiles/CMakeOutput.log"
cat CMakeFiles/CMakeOutput.log
Expand All @@ -73,7 +78,7 @@ jobs:
echo "----"
fi
- name: Build everything else
working-directory: ${{ env.build_dir }}
run: cmake --build . --target all --verbose -j `nproc`
- name: Build everything else
working-directory: ${{ env.build_dir }}
run: cmake --build . --target all --verbose -j `nproc`

5 changes: 5 additions & 0 deletions .github/workflows/Windows.yml
Expand Up @@ -51,6 +51,11 @@ jobs:
run: |
python3 -m pip install conan
- name: Run conan
shell: bash
run: |
conan install . --output-folder=${{ env.build_dir }} --build=missing
- name: Configure CMake
id: configure
shell: bash
Expand Down

0 comments on commit 13539da

Please sign in to comment.