Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI: Upgrade Python, Conan, ConanPackageTools #415

Merged
merged 12 commits into from
Jun 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 0 additions & 58 deletions .appveyor.yml

This file was deleted.

9 changes: 5 additions & 4 deletions .github/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@ if [[ "$(uname -s)" == 'Darwin' ]]; then
eval "$(pyenv init -)"
fi

pyenv install 3.8.6
pyenv virtualenv 3.8.6 conan
pyenv install 3.10.4
pyenv virtualenv 3.10.4 conan

pyenv rehash
pyenv activate conan
fi

pip install --upgrade pip
pip install conan_package_tools==0.37.0
pip install conan==1.43.0
pip install markupsafe==2.0.1
pip install conan_package_tools==0.38.0
pip install conan==1.49.0

conan --version
conan user
61 changes: 60 additions & 1 deletion .github/matrix.json
Original file line number Diff line number Diff line change
@@ -1 +1,60 @@
{"config": [{"name": "Linux GCC 10","compiler": "gcc","version": "10","os": "ubuntu-20.04"},{"name": "Linux GCC 9","compiler": "gcc","version": "9","os": "ubuntu-20.04"},{"name": "Linux GCC 8","compiler": "gcc","version": "8","os": "ubuntu-20.04"},{"name": "Linux Clang 11","compiler": "clang","version": "11","os": "ubuntu-20.04"},{"name": "Linux Clang 10","compiler": "clang","version": "10","os": "ubuntu-20.04"},{"name": "Linux Clang 9","compiler": "clang","version": "9","os": "ubuntu-20.04"},{"name": "macOS apple-clang 12.0", "compiler": "apple-clang","version": "12.0","os": "macos-10.14"},{"name": "Windows VS2019","compiler": "Visual Studio","version": "16","os": "windows-2019","cmake_toolset": "Visual Studio 16 2019"},{"name": "Windows VS2017","compiler": "Visual Studio","version": "15","os": "windows-2016","cmake_toolset": "Visual Studio 15 2017 Win64"}]}
{
"config": [
{
"name": "Linux GCC 10",
"compiler": "gcc",
"version": "10",
"os": "ubuntu-20.04"
},
{
"name": "Linux GCC 9",
"compiler": "gcc",
"version": "9",
"os": "ubuntu-20.04"
},
{
"name": "Linux GCC 8",
"compiler": "gcc",
"version": "8",
"os": "ubuntu-20.04"
},
{
"name": "Linux Clang 11",
"compiler": "clang",
"version": "11",
"os": "ubuntu-20.04"
},
{
"name": "Linux Clang 10",
"compiler": "clang",
"version": "10",
"os": "ubuntu-20.04"
},
{
"name": "Linux Clang 9",
"compiler": "clang",
"version": "9",
"os": "ubuntu-20.04"
},
{
"name": "macOS apple-clang 12.0",
"compiler": "apple-clang",
"version": "12.0",
"os": "macos-10.15"
},
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should consider to add VS 2022.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried. Conan died with a non obvious error. I think adding that will have to be a separate task.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Then later

"name": "Windows VS2019",
"compiler": "Visual Studio",
"version": "16",
"os": "windows-2019",
"cmake_toolset": "Visual Studio 16 2019"
},
{
"name": "Windows VS2017",
"compiler": "Visual Studio",
"version": "15",
"os": "windows-2016",
"cmake_toolset": "Visual Studio 15 2017 Win64"
}
]
}
20 changes: 12 additions & 8 deletions .github/workflows/stlab.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Build and Tests

on: [push, pull_request]
on:
pull_request:
push:
branches:
- main


env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
Expand All @@ -20,10 +25,8 @@ jobs:

- name: Generate Job Matrix
id: set-matrix
run: |
MATRIX=$(cat ./.github/matrix.json)
echo "${MATRIX}"
echo "::set-output name=matrix::${MATRIX}"
# Note: The json in this variable must be a single line for parsing to succeed.
run: echo "::set-output name=matrix::$(cat .github/matrix.json | scripts/flatten_json.py)"

builds:
needs: generate-matrix
Expand All @@ -35,9 +38,9 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.10.4"

- name: Install Dependencies (Unix)
if: ${{ matrix.config.compiler != 'Visual Studio' }}
Expand All @@ -53,7 +56,8 @@ jobs:
python.exe --version
cmake --version
python.exe -m pip install --upgrade pip
pip.exe install conan_package_tools==0.37.0
pip.exe install markupsafe==2.0.1
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See conan-io/conan#10611. I could not find a more appropriate workaround than this. Conan will fail if this dependency is not available.

pip.exe install conan_package_tools==0.38.0
pip.exe install conan==1.43.0
conan --version
conan user
Expand Down
8 changes: 8 additions & 0 deletions scripts/flatten_json.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env python

import functools as ft
import json
import sys

input = ft.reduce(lambda acc, i: acc + i, sys.stdin, "")
print(json.dumps(json.loads(input), separators=(',', ':')))