From 7b9c444dcf1c0b95e71e844f9e8a7537026337e9 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sun, 27 Dec 2020 23:34:33 +0100 Subject: [PATCH] Use GitHub Actions to run current macOS Travis CI tasks --- .github/workflows/macos.yml | 36 ++++++++++++++++++++++++++++++++++++ .travis.yml | 6 +++--- 2 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/macos.yml diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 00000000..77aaaea6 --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,36 @@ +# Copyright (C) 2020 Sebastian Pipping +# Licensed under the MIT license + +name: Run macOS Travis CI tasks + +on: +- pull_request +- push + +jobs: + checks: + name: Perform checks + strategy: + matrix: + include: + # NOTE: This is a quick port from .travis.yml in reaction to + # Homebrew issues at Travis CI. While we have the matrix + # in two places, please keep the two files in sync. Thank you! + - MODE: cmake-oos + - MODE: distcheck + - MODE: qa-sh + FLAT_ENV: CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=address + - MODE: cppcheck + runs-on: macos-latest + steps: + - uses: actions/checkout@v2.3.4 + - name: Install build dependencies + run: | + sudo rm /usr/local/bin/2to3 # so that "brew link" will work + brew bundle # acts upon file Brewfile + - name: Perform check "${{ matrix.MODE }}" + env: + MODE: ${{ matrix.MODE }} + TRAVIS_OS_NAME: osx + run: | + env ${{ matrix.FLAT_ENV }} ./.travis.sh diff --git a/.travis.yml b/.travis.yml index 2b0802ee..f4e74bad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,6 @@ language: cpp os: - linux - - osx dist: trusty git: @@ -14,14 +13,15 @@ env: global: - CFLAGS='-g3 -pipe' matrix: + # NOTE: There is a copy of this matrix at .github/workflows/macos.yml + # for GitHub Actions. While we have the matrix in two places, + # please keep the two files in sync. Thank you! - MODE=cmake-oos - MODE=distcheck - MODE=qa-sh CC=clang CXX=clang++ LD=clang++ QA_SANITIZER=address matrix: include: - - os: osx - env: MODE=cppcheck - os: linux env: MODE=clang-format - os: linux