Skip to content

Commit

Permalink
Update conan remote and workflow actions
Browse files Browse the repository at this point in the history
    - Use debian/ubuntu images
    - Update compiler version matrix
    - Remove conan 1
  • Loading branch information
joakimono committed Feb 12, 2025
1 parent ce93659 commit fcbf539
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 102 deletions.
56 changes: 0 additions & 56 deletions .github/workflows/ci-conan-clang.yml

This file was deleted.

60 changes: 34 additions & 26 deletions .github/workflows/ci-conan-gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,50 +8,58 @@ env:
CONAN_PASSWORD_SINTEF: ${{ secrets.CONAN_PASSWORD }}
CONAN_LOGIN_USERNAME_SINTEF: ${{ secrets.CONAN_USER }}
CONFIG_URL: https://github.com/sintef-ocean/conan-configs.git

DEBIAN_FRONTEND: noninteractive
TZ: Etc/UTC
jobs:
conan-with-gcc:
name: Conan
runs-on: ubuntu-22.04
env:
USER_CHANNEL: "${{ matrix.conan == '1.0' && 'sintef/stable' || '--user sintef --channel stable' }}"
UPLOAD_FLAGS: "${{ matrix.conan == '1.0' && '--all' || '' }}"
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
conan: ["2.0"]
profile: [gcc]
compiler_version: [8, 9, 10, 11, 12]
compiler_version: [11, 12, 13, 14]
build_type: [Debug, Release]
include:
- linux: debian:latest
-
linux: debian:trixie
compiler_version: 14
-
linux: ubuntu:24.04
compiler_version: 13
-
linux: debian:bookworm
compiler_version: 12
-
linux: ubuntu:22.04
compiler_version: 11
container:
image: conanio/gcc${{ matrix.compiler_version }}-ubuntu18.04
image: ${{ matrix.linux }}
options: -u 0
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install prerequisites
run: |
sudo apt-get update
sudo apt-get install -y jq
pip3 install --upgrade setuptools pip
pip3 install --upgrade conan~=${{ matrix.conan }}
- name: Configure Conan
run: conan remote add sintef ${{ env.CONAN_UPLOAD }}
- name: Get package name Conan 1
if: matrix.conan == '1.0'
run: echo "package_name=$(conan inspect --raw name .)" >> $GITHUB_ENV
- name: Get package name Conan 2
if: matrix.conan == '2.0'
run: echo "package_name=$(conan inspect -f json . | jq .name -r)" >> $GITHUB_ENV
- name: Conan create
apt-get update
apt-get install -y jq pipx build-essential cmake git
pipx install conan
echo "/github/home/.local/bin" >> $GITHUB_PATH
- name: Conan configs
run: |
conan remote add sintef ${{ env.CONAN_UPLOAD }}
echo "package_name=$(conan inspect -f json . | jq .name -r)" >> $GITHUB_ENV
git config --global --add safe.directory '*'
conan config install ${{ env.CONFIG_URL }} --type git -sf conan${{ matrix.conan }}
conan config install ${{ env.CONFIG_URL }} --type git -sf conan2.0
conan config install ${{ env.CONFIG_URL }} --type git -sf profiles -tf profiles
- name: Conan create
run: |
conan create -s build_type=${{ matrix.build_type }} \
-s compiler.version=${{ matrix.compiler_version }} \
-pr:b=${{ matrix.profile }} -pr:h=${{ matrix.profile }} \
-b missing -b outdated -b ${{ env.package_name }}* \
-b missing -b outdated -b '${{ env.package_name }}*' \
-o boost/*:extra_b2_flags=define=BOOST_FILESYSTEM_DISABLE_STATX \
. ${{ env.USER_CHANNEL }}
--user sintef --channel stable \
.
- name: Conan upload
run: conan upload --confirm -r sintef ${{ env.package_name }}* --force ${{ env.UPLOAD_FLAGS }}
run: conan upload --confirm -r sintef '${{ env.package_name }}*' --force
26 changes: 8 additions & 18 deletions .github/workflows/ci-conan-msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,45 +12,35 @@ env:
jobs:
conan-with-msvc:
name: Conan
runs-on: windows-2022
env:
USER_CHANNEL: "${{ matrix.conan == '1.0' && 'sintef/stable' || '--user sintef --channel stable' }}"
UPLOAD_FLAGS: "${{ matrix.conan == '1.0' && '--all' || '' }}"
runs-on: windows-2025
strategy:
fail-fast: false
matrix:
conan: ["2.0"]
profile: [msvc17]
compiler_version: [191, 192, 193]
compiler_version: [192, 194]
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install prerequisites
run: |
pip3 install --upgrade setuptools pip
pip3 install --upgrade conan~=${{ matrix.conan }}
pip3 install --upgrade conan~=2.0
- name: Configure Conan
run: conan remote add sintef ${{ env.CONAN_UPLOAD }}
- name: Get package name Conan 1
if: matrix.conan == '1.0'
shell: pwsh
run: |
$package_name=conan inspect --raw name .
echo "package_name=$package_name" >> $Env:GITHUB_ENV
- name: Get package name Conan 2
if: matrix.conan == '2.0'
shell: pwsh
run: |
$package_name=conan inspect -f json . | jq .name -r
echo "package_name=$package_name" >> $Env:GITHUB_ENV
- name: Conan create
run: |
conan config install ${{ env.CONFIG_URL }} --type git -sf conan${{ matrix.conan }}
conan config install ${{ env.CONFIG_URL }} --type git -sf conan2.0
conan config install ${{ env.CONFIG_URL }} --type git -sf profiles -tf profiles
conan create -s build_type=${{ matrix.build_type }} `
-s compiler.version=${{ matrix.compiler_version }} `
-pr:b=${{ matrix.profile }} -pr:h=${{ matrix.profile }} `
-b missing -b outdated -b ${{ env.package_name }}* `
. ${{ env.USER_CHANNEL }}
--user sintef --channel stable `
.
- name: Conan upload
run: conan upload --confirm -r sintef ${{ env.package_name }}* --force ${{ env.UPLOAD_FLAGS }}
run: conan upload --confirm -r sintef ${{ env.package_name }}* --force
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[![Linux GCC](https://github.com/sintef-ocean/conan-mscl/workflows/Linux%20GCC/badge.svg)](https://github.com/sintef-ocean/conan-mscl/actions?query=workflow%3A"Linux+GCC")
[![Linux Clang](https://github.com/sintef-ocean/conan-mscl/workflows/Linux%20Clang/badge.svg)](https://github.com/sintef-ocean/conan-mscl/actions?query=workflow%3A"Linux+Clang")
[![Windows MSVC](https://github.com/sintef-ocean/conan-mscl/workflows/Windows%20MSVC/badge.svg)](https://github.com/sintef-ocean/conan-mscl/actions?query=workflow%3A"Windows+MSVC")

[Conan.io](https://conan.io) recipe for [MSCL](https://github.com/LORD-MicroStrain/MSCL).
Expand All @@ -9,7 +8,7 @@
1. Add remote to conan's package [remotes](https://docs.conan.io/2/reference/commands/remote.html)

```bash
$ conan remote add sintef https://artifactory.smd.sintef.no/artifactory/api/conan/conan-local
$ conan remote add sintef https://package.smd.sintef.no
```

2. Using [*conanfile.txt*](https://docs.conan.io/2/reference/conanfile_txt.html) and *cmake* in your project.
Expand Down

0 comments on commit fcbf539

Please sign in to comment.