aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-03-24 18:11:23 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-03-24 18:11:23 +0300
commite1ed577d747cf75740125ba76f0cbfed100648f9 (patch)
tree3934272d01e02dc18bf455b6a3d5e149ef52a452
parentREADME: actualize (diff)
downloadcmake-common-e1ed577d747cf75740125ba76f0cbfed100648f9.tar.gz
cmake-common-e1ed577d747cf75740125ba76f0cbfed100648f9.zip
project.ci: use same variable names for all CIs
Using different ones was quite weird to begin with.
-rw-r--r--.github/workflows/ci_appveyor.yml2
-rw-r--r--.github/workflows/ci_github.yml8
-rw-r--r--.github/workflows/ci_travis.yml6
-rw-r--r--README.md8
-rw-r--r--project/ci/dirs.py30
5 files changed, 17 insertions, 37 deletions
diff --git a/.github/workflows/ci_appveyor.yml b/.github/workflows/ci_appveyor.yml
index da12953..f27f43b 100644
--- a/.github/workflows/ci_appveyor.yml
+++ b/.github/workflows/ci_appveyor.yml
@@ -30,7 +30,7 @@ jobs:
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
PLATFORM: '${{ matrix.platform }}'
CONFIGURATION: '${{ matrix.configuration }}'
- boost_version: 1.72.0
+ BOOST_VERSION: 1.72.0
defaults:
run:
diff --git a/.github/workflows/ci_github.yml b/.github/workflows/ci_github.yml
index 91b1c96..897e37e 100644
--- a/.github/workflows/ci_github.yml
+++ b/.github/workflows/ci_github.yml
@@ -27,10 +27,10 @@ jobs:
name: '${{ matrix.os }} / ${{ matrix.toolset }} / ${{ matrix.configuration }}'
env:
- toolset: '${{ matrix.toolset }}'
- platform: x64
- configuration: '${{ matrix.configuration }}'
- boost_version: 1.72.0
+ TOOLSET: '${{ matrix.toolset }}'
+ PLATFORM: x64
+ CONFIGURATION: '${{ matrix.configuration }}'
+ BOOST_VERSION: 1.72.0
defaults:
run:
diff --git a/.github/workflows/ci_travis.yml b/.github/workflows/ci_travis.yml
index c585f57..3ee4550 100644
--- a/.github/workflows/ci_travis.yml
+++ b/.github/workflows/ci_travis.yml
@@ -25,9 +25,9 @@ jobs:
# https://docs.travis-ci.com/user/environment-variables/#default-environment-variables
TRAVIS: 'true'
TRAVIS_BUILD_DIR: '${{ github.workspace }}/examples/boost'
- platform: x64
- configuration: '${{ matrix.configuration }}'
- boost_version: 1.72.0
+ PLATFORM: x64
+ CONFIGURATION: '${{ matrix.configuration }}'
+ BOOST_VERSION: 1.72.0
defaults:
run:
diff --git a/README.md b/README.md
index d8b4b10..23e100f 100644
--- a/README.md
+++ b/README.md
@@ -89,10 +89,10 @@ parameters from environment variables.
| | Travis | AppVeyor | GitHub Actions
| ----------------- | ------------------------------------ | ------------------------------------------ | ------------------------------------
-| `--toolset` | `$toolset` | `%toolset%` | `$toolset`
-| `--platform` | `$platform` | `%PLATFORM%` | `$platform`
-| `--configuration` | `$configuration` | `%CONFIGURATION%` | `$configuration`
-| Boost version | `$boost_version` | `%boost_version%` | `$boost_version`
+| `--toolset` | `$TOOLSET` | `%TOOLSET%` | `$TOOLSET`
+| `--platform` | `$PLATFORM` | `%PLATFORM%` | `$PLATFORM`
+| `--configuration` | `$CONFIGURATION` | `%CONFIGURATION%` | `$CONFIGURATION`
+| Boost version | `$BOOST_VERSION` | `%BOOST_VERSION%` | `$BOOST_VERSION`
| Boost path | `$TRAVIS_BUILD_DIR/../build/boost` | `%APPVEYOR_BUILD_FOLDER%\..\build\boost` | `$GITHUB_WORKSPACE/../build/boost`
| Build path | `$TRAVIS_BUILD_DIR/../build/cmake` | `%APPVEYOR_BUILD_FOLDER%\..\build\cmake` | `$GITHUB_WORKSPACE/../build/cmake`
| Install path | `$TRAVIS_BUILD_DIR/../build/install` | `%APPVEYOR_BUILD_FOLDER%\..\build\install` | `$GITHUB_WORKSPACE/../build/install`
diff --git a/project/ci/dirs.py b/project/ci/dirs.py
index 6513455..b743380 100644
--- a/project/ci/dirs.py
+++ b/project/ci/dirs.py
@@ -40,17 +40,15 @@ class Dirs(abc.ABC):
pass
def get_toolset(self):
- if 'toolset' in os.environ:
- return ToolchainType.parse(os.environ['toolset'])
+ if 'TOOLSET' in os.environ:
+ return ToolchainType.parse(os.environ['TOOLSET'])
return None
- @abc.abstractmethod
def get_platform(self):
- pass
+ return Platform.parse(env('PLATFORM'))
- @abc.abstractmethod
def get_configuration(self):
- pass
+ return Configuration.parse(env('CONFIGURATION'))
@abc.abstractmethod
def get_src_dir(self):
@@ -64,7 +62,7 @@ class Dirs(abc.ABC):
pass
def get_boost_version(self):
- return Version.from_string(env('boost_version'))
+ return Version.from_string(env('BOOST_VERSION'))
def get_boost_dir(self):
return os.path.join(self.get_build_dir(), 'boost')
@@ -110,12 +108,6 @@ class Travis(Dirs):
def this_one(self):
return 'TRAVIS' in os.environ
- def get_platform(self):
- return Platform.parse(env('platform'))
-
- def get_configuration(self):
- return Configuration.parse(env('configuration'))
-
def get_src_dir(self):
return env('TRAVIS_BUILD_DIR')
@@ -136,12 +128,6 @@ class AppVeyor(Dirs):
def this_one(self):
return 'APPVEYOR' in os.environ
- def get_platform(self):
- return Platform.parse(env('PLATFORM'))
-
- def get_configuration(self):
- return Configuration.parse(env('CONFIGURATION'))
-
def get_src_dir(self):
return env('APPVEYOR_BUILD_FOLDER')
@@ -160,12 +146,6 @@ class GitHub(Dirs):
def this_one(self):
return 'GITHUB_ACTIONS' in os.environ
- def get_platform(self):
- return Platform.parse(env('platform'))
-
- def get_configuration(self):
- return Configuration.parse(env('configuration'))
-
def get_src_dir(self):
return env('GITHUB_WORKSPACE')