Skip to content

Commit

Permalink
Uploading artifacts to jfrog
Browse files Browse the repository at this point in the history
gcc9 builds are not available from conancenter. Built libraries are uploaded to osp jfrog.
  • Loading branch information
davidhjp01 authored Feb 15, 2024
1 parent 26be36b commit f690b39
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 15 deletions.
38 changes: 27 additions & 11 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ jobs:
linux:
name: Linux
runs-on: ${{ matrix.os }}
env:
CC: gcc-${{ matrix.compiler_version }}
CXX: g++-${{ matrix.compiler_version }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
os: [ubuntu-latest]
build_type: [Debug, Release]
compiler_version: [ 9 ]
compiler_libcxx: [ libstdc++11 ]
steps:
- uses: actions/checkout@v4
- name: Install Conan
Expand All @@ -22,13 +27,18 @@ jobs:
- name: Install dependencies
run: conan install --build=missing --output-folder=build -s build_type=${{ matrix.build_type }} .
- name: Generate build system
run: cmake --preset conan-$(echo ${{ matrix.build_type }} | tr '[:upper:]' '[:lower:]') -DPROXYFMU_BUILD_EXAMPLES=ON -DPROXYFMU_BUILD_TESTS=ON
working-directory: build
run: >
cmake ..
-DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DPROXYFMU_BUILD_EXAMPLES=ON
-DPROXYFMU_BUILD_TESTS=ON
- name: Build
run: cmake --build --preset conan-$(echo ${{ matrix.build_type }} | tr '[:upper:]' '[:lower:]')
working-directory: build
run: cmake --build .
- name: Test
run: |
cd build/tests
ctest --output-on-failure --extra-verbose
run: cd build/tests && ctest --output-on-failure --extra-verbose
- uses: actions/upload-artifact@v3
if: matrix.build_type == 'Release'
with:
Expand All @@ -54,13 +64,19 @@ jobs:
- name: Install dependencies
run: conan install --build=missing --output-folder=build -s build_type=${{ matrix.build_type }} .
- name: Generate build system
run: cmake --preset conan-default -DPROXYFMU_BUILD_EXAMPLES=ON -DPROXYFMU_BUILD_TESTS=ON
working-directory: build
shell: bash
run: >
cmake ..
-DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake
-DCMAKE_POLICY_DEFAULT_CMP0091=NEW
-DPROXYFMU_BUILD_EXAMPLES=ON
-DPROXYFMU_BUILD_TESTS=ON
- name: Build
run: cmake --build --preset "conan-${{ matrix.build_type }}".ToLower()
working-directory: build
run: cmake --build . --config ${{ matrix.build_type }}
- name: Test
run: |
cd build/tests
ctest -C ${{ matrix.build_type }} --output-on-failure --extra-verbose
run: cd build/tests && ctest -C ${{ matrix.build_type }} --output-on-failure --extra-verbose
- uses: actions/upload-artifact@v3
if: matrix.build_type == 'Release'
with:
Expand Down
21 changes: 17 additions & 4 deletions .github/workflows/upload-conan-pkgs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,16 @@ jobs:
SHORT_REFNAME="${REFNAME:0:40}"
CHANNEL="testing-${SHORT_REFNAME//\//_}"
fi
conan create -s build_type=${{ matrix.build_type }} -s compiler.version=${{ matrix.compiler_version }} -s compiler.libcxx=${{ matrix.compiler_libcxx }} -b missing . --user=osp --channel=${CHANNEL}
conan create \
-s build_type=${{ matrix.build_type }} \
-s compiler.version=${{ matrix.compiler_version }} \
-s compiler.libcxx=${{ matrix.compiler_libcxx }} \
-b missing \
--user=osp \
--channel=${CHANNEL} \
.
- name: Conan upload
run: conan upload --confirm --remote osp 'proxyfmu*'
run: conan upload --confirm --remote osp '*'


windows:
Expand All @@ -56,6 +63,7 @@ jobs:
matrix:
os: [windows-2019]
build_type: [Debug, Release]
timeout-minutes: 120

steps:
- uses: actions/checkout@v4
Expand All @@ -76,6 +84,11 @@ jobs:
SHORT_REFNAME="${REFNAME:0:40}"
CHANNEL="testing-${SHORT_REFNAME//\//_}"
fi
conan create -s build_type=${{ matrix.build_type }} -b missing . --user=osp --channel=${CHANNEL}
conan create \
-s build_type=${{ matrix.build_type }} \
-b missing \
--user=osp \
--channel=${CHANNEL} \
.
- name: Conan upload
run: conan upload --confirm --remote osp 'proxyfmu*'
run: conan upload --confirm --remote osp '*'

0 comments on commit f690b39

Please sign in to comment.