Skip to content

Commit

Permalink
update CI config files
Browse files Browse the repository at this point in the history
  • Loading branch information
20DM committed Jul 1, 2024
1 parent 0073885 commit f22fc8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 49 deletions.
26 changes: 2 additions & 24 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,37 +134,15 @@ jobs:
${{ matrix.os }}-${{ matrix.cxx }}
${{ matrix.os }}
#- name: Checkout cppflow repo
# uses: actions/checkout@v3
# with:
# repository: UCL/cppflow.git
# path: cppflow
# ref: master

#- name: Create cppflow package on gcc
# if: ${{ contains(matrix.cxx, 'g++-10') }}
# run: |
# #conan create ./cppflow/ -pr:h=default -pr:b=default -s compiler.libcxx=libstdc++11
# conan profile detect
# sed -i'' -e "s|generators|#generators|1" ./cppflow/conanfile.py
# conan create ./cppflow/ -s compiler.cppstd=gnu17

#- name: Create cppflow package on apple-clang
# if: ${{ contains(matrix.cxx, 'clang++') }}
# run: |
# conan profile detect
# sed -i'' -e "s|generators|#generators|1" ./cppflow/conanfile.py
# conan create ./cppflow/ -s compiler.cppstd=gnu17

- name: Dependencies
run: |
conan profile detect
conan install ${{github.workspace}} -of ${{github.workspace}}/build --build missing -o dompi=${{matrix.mpi}} -o openmp=${{matrix.omp}} -o cppflow=off -o onnxrt=on -s compiler.cppstd=17
conan install ${{github.workspace}} -of ${{github.workspace}}/build --build missing -o dompi=${{matrix.mpi}} -o openmp=${{matrix.omp}} -o onnxrt=on -s compiler.cppstd=17
- name: Build
# Build your program with the given configuration.
# The Github Actions machines are dual-core so we can build faster using 2 parallel processes
run: conan build ${{github.workspace}} -of ${{github.workspace}}/build -o dompi=${{matrix.mpi}} -o openmp=${{matrix.omp}} -o cppflow=off -o onnxrt=on -s compiler.cppstd=17
run: conan build ${{github.workspace}} -of ${{github.workspace}}/build -o dompi=${{matrix.mpi}} -o openmp=${{matrix.omp}} -o onnxrt=on -s compiler.cppstd=17

- name: Test
working-directory: ${{github.workspace}}/build
Expand Down
27 changes: 2 additions & 25 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,46 +62,23 @@ jobs:
version: 2.11.0
os: linux

- name: Checkout cppflow repo
uses: actions/checkout@v3
with:
repository: UCL/cppflow.git
path: cppflow
ref: master

- name: Create cppflow package
run: |
if [[ "$USE_CONAN" = 1 ]]; then
conan profile detect
sed -i'' -e "s|generators|#generators|1" ./cppflow/conanfile.py
conan create ./cppflow/
else
mkdir cppflow/build
cd cppflow/build
cmake .. -DCMAKE_INSTALL_PREFIX=${PWD}
make -j$(nproc --ignore 1)
make -j$(nproc --ignore 1) install
fi
- name: Configure
run: |
if [[ "$USE_CONAN" = 1 ]]; then
conan install ${{github.workspace}} -of ${{github.workspace}}/build --build missing -s compiler.libcxx=libstdc++11 -o dompi=off -o openmp=off -o docs=off -o cppflow=on
conan install ${{github.workspace}} -of ${{github.workspace}}/build --build missing -s compiler.libcxx=libstdc++11 -o dompi=off -o openmp=off -o docs=off -o onnxrt=on
else
export PATH=${{github.workspace}}/cppflow/build:$PATH
export PATH=${{github.workspace}}/Catch2/build:$PATH
export CMAKE_PREFIX_PATH=${{github.workspace}}/Catch2/build/lib/cmake/Catch2:$CMAKE_PREFIX_PATH
mkdir ${{github.workspace}}/build
cd ${{github.workspace}}/build
cmake .. -DCMAKE_INSTALL_PREFIX=${PWD} -Ddompi=OFF -Dopenmp=OFF -Ddocs=ON -Dcppflow=ON -Donnxrt=ON
cmake .. -DCMAKE_INSTALL_PREFIX=${PWD} -Ddompi=OFF -Dopenmp=OFF -Ddocs=ON -Donnxrt=ON
fi
- name: Build
run: |
if [[ "$USE_CONAN" = 1 ]]; then
conan build ${{github.workspace}} -of ${{github.workspace}}/build
else
export PATH=${{github.workspace}}/cppflow/build:$PATH
export PATH=${{github.workspace}}/Catch2/build:$PATH
cd ${{github.workspace}}/build
make -j$(nproc --ignore 1)
Expand Down

0 comments on commit f22fc8e

Please sign in to comment.