Attempt new approach to build containers #47
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Linux GCC | |
on: [push, workflow_dispatch] | |
env: | |
CONAN_UPLOAD: ${{ secrets.CONAN_URL }} | |
CONAN_PASSWORD_SINTEF: ${{ secrets.CONAN_PASSWORD }} | |
CONAN_LOGIN_USERNAME_SINTEF: ${{ secrets.CONAN_USER }} | |
CONFIG_URL: https://github.com/sintef-ocean/conan-configs.git | |
jobs: | |
conan-with-gcc: | |
name: Conan | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
profile: [gcc] | |
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: debian:${{ matrix.debian }} | |
options: -u 0 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install prerequisites | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y jq pipx build-essential cmake git | |
pipx install conan | |
pipx ensurepath | |
- name: Configure Conan | |
run: conan remote add sintef ${{ env.CONAN_UPLOAD }} | |
- name: Get package name Conan 2 | |
run: echo "package_name=$(conan inspect -f json . | jq .name -r)" >> $GITHUB_ENV | |
- name: Conan create | |
run: | | |
git config --global --add safe.directory '*' | |
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 }}* \ | |
--user sintef --channel stable \ | |
. | |
- name: Conan upload | |
run: conan upload --confirm -r sintef ${{ env.package_name }}* --force |