Skip to content

Commit

Permalink
Update pipeline to build with conan2
Browse files Browse the repository at this point in the history
Also make it simpler for now
  • Loading branch information
Diego Jesus authored and diegoarjz committed Aug 17, 2024
1 parent bc75398 commit c8f7a9b
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 166 deletions.
103 changes: 8 additions & 95 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ jobs:
cc: "gcc-9",
cxx: "g++-9"
}
- {
name: "Ubuntu-clang",
os: ubuntu-latest,
set_path: "export PATH=$PATH:/home/runner/.local/bin",
conan_profile: './tools/profiles/ubuntu_clang_Release_gh.txt',
cc: "clang",
cxx: "clang++"
}
- {
name: "macOs-clang",
os: macos-latest,
Expand All @@ -49,8 +41,11 @@ jobs:

- 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 conan==1.58.0
pip3 install -r ${{ github.workspace }}/pagoda/requirements.txt
- name: Download and Install Dependencies (Ubuntu)
if: ${{ contains(matrix.config.os, 'Ubuntu') }}
run: |
Expand All @@ -62,23 +57,20 @@ jobs:
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 -if ${{ github.workspace }}/build -pr ${{ github.workspace}}/pagoda/${{ matrix.config.conan_profile }} ${{ github.workspace }}/pagoda --build=missing
conan build -bf ${{ github.workspace }}/build ${{ github.workspace }}/pagoda
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: Create package
run: |
${{ matrix.config.set_path }}
conan package -bf ${{ github.workspace }}/build -pf ${{ github.workspace }}/build/pagoda ${{ github.workspace }}/pagoda
- name: Pack Build Results
if: always()
shell: cmake -P {0}
Expand Down Expand Up @@ -109,82 +101,3 @@ jobs:
with:
path: ./${{ matrix.config.name }}.tar.xz
name: ${{ matrix.config.name }}.tar.xz

release:
if: contains(github.ref, 'tags/v')
runs-on: ubuntu-latest
needs: build

steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Store Release url
run: |
echo "${{ steps.create_release.outputs.upload_url }}" > ./upload_url
- uses: actions/upload-artifact@v1
with:
path: ./upload_url
name: upload_url

publish:
if: contains(github.ref, 'tags/v')
runs-on: ${{ matrix.config.os }}
needs: release
strategy:
fail-fast: false
matrix:
config:
- {
name: "Ubuntu-gcc",
os: ubuntu-latest,
}
- {
name: "Ubuntu-clang",
os: ubuntu-latest,
}
- {
name: "macOs-clang",
os: ubuntu-latest,
}
- {
name: "Windows-msvc",
os: windows-latest,
}

steps:
- name: Download artifact
uses: actions/download-artifact@v1
with:
name: ${{ matrix.config.name }}.tar.xz
path: ./

- name: Download URL
uses: actions/download-artifact@v1
with:
name: upload_url
path: ./
- id: set_upload_url
run: |
upload_url=`cat ./upload_url`
echo ::set-output name=upload_url::$upload_url
- name: Upload to Release
id: upload_to_release
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.set_upload_url.outputs.upload_url }}
asset_path: ./${{ matrix.config.name }}.tar.xz
asset_name: ${{ matrix.config.name }}.tar.xz
asset_content_type: application/x-gtar
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
conan==2.6.0
cmake==3.30.2
63 changes: 30 additions & 33 deletions tools/profiles/macos_clang_Release_gh.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
Expand All @@ -9,36 +8,34 @@
os_build=Macos

[options]
boost:without_atomic=True
boost:without_chrono=False
boost:without_container=True
boost:without_context=True
boost:without_contract=True
boost:without_coroutine=True
boost:without_date_time=True
boost:without_exception=True
boost:without_fiber=True
boost:without_filesystem=False
boost:without_graph=True
boost:without_graph_parallel=True
boost:without_iostreams=True
boost:without_locale=True
boost:without_log=True
boost:without_math=True
boost:without_mpi=True
boost:without_nowide=True
boost:without_program_options=False
boost:without_python=True
boost:without_random=True
boost:without_regex=True
boost:without_serialization=True
boost:without_stacktrace=True
boost:without_system=False
boost:without_test=True
boost:without_thread=True
boost:without_timer=True
boost:without_type_erasure=True
boost:without_wave=True
boost/*:without_atomic=True
boost/*:without_chrono=False
boost/*:without_container=True
boost/*:without_context=True
boost/*:without_contract=True
boost/*:without_coroutine=True
boost/*:without_date_time=True
boost/*:without_exception=True
boost/*:without_fiber=True
boost/*:without_filesystem=False
boost/*:without_graph=True
boost/*:without_graph_parallel=True
boost/*:without_iostreams=True
boost/*:without_locale=True
boost/*:without_log=True
boost/*:without_math=True
boost/*:without_mpi=True
boost/*:without_nowide=True
boost/*:without_program_options=False
boost/*:without_python=True
boost/*:without_random=True
boost/*:without_regex=True
boost/*:without_serialization=True
boost/*:without_stacktrace=True
boost/*:without_system=False
boost/*:without_test=True
boost/*:without_thread=True
boost/*:without_timer=True
boost/*:without_type_erasure=True
boost/*:without_wave=True

[build_requires]
[env]
71 changes: 33 additions & 38 deletions tools/profiles/ubuntu_gcc_Release_gh.txt
Original file line number Diff line number Diff line change
@@ -1,50 +1,45 @@
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu17
compiler.libcxx=libstdc++11
compiler.version=9
compiler.version=14
os=Linux
os_build=Linux

[options]
boost:without_atomic=True
boost:without_chrono=False
boost:without_container=True
boost:without_context=True
boost:without_contract=True
boost:without_coroutine=True
boost:without_date_time=True
boost:without_exception=True
boost:without_fiber=True
boost:without_filesystem=False
boost:without_graph=True
boost:without_graph_parallel=True
boost:without_iostreams=True
boost:without_locale=True
boost:without_log=True
boost:without_math=True
boost:without_mpi=True
boost:without_nowide=True
boost:without_program_options=False
boost:without_python=True
boost:without_random=True
boost:without_regex=True
boost:without_serialization=True
boost:without_stacktrace=True
boost:without_system=False
boost:without_test=True
boost:without_thread=True
boost:without_timer=True
boost:without_type_erasure=True
boost:without_wave=True

[build_requires]
boost/*:without_atomic=True
boost/*:without_chrono=False
boost/*:without_container=True
boost/*:without_context=True
boost/*:without_contract=True
boost/*:without_coroutine=True
boost/*:without_date_time=True
boost/*:without_exception=True
boost/*:without_fiber=True
boost/*:without_filesystem=False
boost/*:without_graph=True
boost/*:without_graph_parallel=True
boost/*:without_iostreams=True
boost/*:without_locale=True
boost/*:without_log=True
boost/*:without_math=True
boost/*:without_mpi=True
boost/*:without_nowide=True
boost/*:without_program_options=False
boost/*:without_python=True
boost/*:without_random=True
boost/*:without_regex=True
boost/*:without_serialization=True
boost/*:without_stacktrace=True
boost/*:without_system=False
boost/*:without_test=True
boost/*:without_thread=True
boost/*:without_timer=True
boost/*:without_type_erasure=True
boost/*:without_wave=True

[conf]
tools.system.package_manager:mode=install
tools.system.package_manager:sudo=sudo

[env]
CC=gcc-9
CXX=g++-9

0 comments on commit c8f7a9b

Please sign in to comment.