Linux Clang #85
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 Clang | |
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-clang: | |
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' || '' }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
conan: ["2.0"] | |
profile: [clang] | |
compiler_version: [11, 12, 13, 14] | |
build_type: [Debug, Release] | |
container: | |
image: conanio/clang${{ matrix.compiler_version }}-ubuntu18.04 | |
options: -u 0 | |
steps: | |
- uses: actions/checkout@v3 | |
- 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 ${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 | |
run: | | |
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 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 }} | |
- name: Conan upload | |
run: conan upload --confirm -r sintef ${{ env.package_name }}* --force ${{ env.UPLOAD_FLAGS }} |