From 83fbfcf88a692fd3b578b7907f7b6f863a5d29ee Mon Sep 17 00:00:00 2001 From: Alex Thiessen Date: Sat, 18 Apr 2020 18:39:29 +0200 Subject: [PATCH 1/4] travis: Remove obsolete `sudo` `sudo` key is deprecated, refer to https://docs.travis-ci.com/user/reference/overview/#deprecated-virtualization-environments. --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b3fa2728..d10607db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,3 @@ -sudo: false script: test/run language: c os: From 44ddc583340abe8429d07438795539311eb70feb Mon Sep 17 00:00:00 2001 From: Alex Thiessen Date: Sat, 18 Apr 2020 18:39:35 +0200 Subject: [PATCH 2/4] travis: Update language from `c` to `shell` Be more precise as to what language is used; full list is found here: https://config.travis-ci.com/ref/language. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d10607db..198a72c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ script: test/run -language: c +language: shell os: - linux - osx From 576f2b37acf290ff44c034fd3c7f6fa3971e3b86 Mon Sep 17 00:00:00 2001 From: Alex Thiessen Date: Sat, 18 Apr 2020 18:39:36 +0200 Subject: [PATCH 3/4] travis: Switch build matrix from `os` to `jobs` There are a couple ways to declare a build matrix in Travis CI, refer to https://docs.travis-ci.com/user/build-matrix. Since upcoming commits will add more ways to run tests, switch the build matrix from simple OS variation to a more powerful list of jobs. --- .travis.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 198a72c0..a5d5806f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ -script: test/run language: shell -os: - - linux - - osx + +jobs: + - script: test/run + os: linux + - script: test/run + os: osx From b75b7697198b4eaa02c44d6290cb3f1aa1c046e1 Mon Sep 17 00:00:00 2001 From: Alex Thiessen Date: Sat, 18 Apr 2020 18:43:10 +0200 Subject: [PATCH 4/4] travis: Refactor jobs to use inheritance Since the existing jobs are similar (currently, the `script` keys are same), move the equal parts to a new shared key to have them in one place. The new map will receive more content in upcoming commits. --- .travis.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a5d5806f..a35f07a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,15 @@ +# YAML anchors need to appear first. +# Keys starting with an underscore are the custom ones, refer to +# https://docs.travis-ci.com/user/build-config-yaml#private-keys-as-yaml-anchors-and-aliases-and-external-tooling + +_native_job: &native_job + script: | + test/run + language: shell jobs: - - script: test/run + - <<: *native_job os: linux - - script: test/run + - <<: *native_job os: osx