Upgrade to Conan 2.0 #84
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: Conan-Tests | |
on: push | |
jobs: | |
Windows: | |
name: Windows | |
runs-on: "windows-latest" | |
steps: | |
- name: Install Conan | |
uses: turtlebrowser/get-conan@main | |
- name: install CMake | |
uses: lukka/get-cmake@latest | |
- name: Install MSVC | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Create conan package | |
run: | | |
cd conan | |
conan create . --build=missing --profile:build=profiles/msvc2022 --profile:host=profiles/msvc2022 | |
- name: Test package components | |
shell: pwsh | |
run: | | |
foreach ($folder in (Get-ChildItem -Path ./conan/tests -Directory | Foreach-Object {$_.Name})) { | |
echo "Running ${folder}" | |
& script\test_conan.bat "${folder}" --profile:build="$pwd/conan/profiles/msvc2022" --profile:host="$pwd/conan/profiles/msvc2022" | |
if ($LASTEXITCODE -ne 0) { | |
exit(1) | |
} | |
} | |
Linux: | |
name: Linux | |
runs-on: "ubuntu-latest" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: "GCC12" | |
dockerfile: "gcc12.Dockerfile" | |
image: "gcc12-conan:latest" | |
profile: "gcc12" | |
- name: "Clang15 with libstdc++" | |
dockerfile: "clang15.Dockerfile" | |
image: "clang15-conan:latest" | |
profile: "clang15-libstdcpp" | |
# - name: "Clang15 with libc++" | |
# dockerfile: "clang15.Dockerfile" | |
# image: "clang15-conan:latest" | |
# profile: "clang15-libcxx" | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Build Dockerfile | |
if: ${{ matrix.dockerfile != '' }} | |
run: >- | |
docker build -t ${{ matrix.image }} -f "conan/docker/${{ matrix.dockerfile }}" "conan/docker/" | |
- name: Create conan package and test it | |
run: >- | |
docker run --network="host" --rm | |
--mount "src=${GITHUB_WORKSPACE},target=/project,type=bind" | |
--workdir /project ${{ matrix.image }} | |
script/ci/conan.sh ${{ matrix.profile }} |