From 5a5bd7e27032ebf82d09552b28e13356281f87f5 Mon Sep 17 00:00:00 2001 From: Tim Niederhausen Date: Fri, 10 Feb 2023 05:27:31 +0100 Subject: [PATCH] Replace Travis CI with GitHub actions --- .github/workflows/linux.yml | 42 +++++++++++++++++++++++++++++++++++++ .travis.yml | 32 ---------------------------- 2 files changed, 42 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/linux.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 0000000..54726b2 --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,42 @@ +name: Linux + +on: + push: + branches: [ master ] + pull_request: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }} + cancel-in-progress: true + +jobs: + build: + name: build + runs-on: ubuntu-20.04 + continue-on-error: true + + strategy: + matrix: + compiler: + - { compiler: GNU, CC: gcc, CXX: g++, } + - { compiler: LLVM, CC: clang, CXX: clang++ } + + steps: + - name: checkout + uses: actions/checkout@v2 + + - name: cmake + env: + CC: ${{ matrix.compiler.CC }} + CXX: ${{ matrix.compiler.CXX }} + run: | + cmake -B ${{ github.workspace }}/build + + - name: build library + run: | + cmake --build ${{ github.workspace }}/build + + - name: run tests + working-directory: ${{ github.workspace }}/build + run: | + ctest diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2df8ab9..0000000 --- a/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -language: cpp - -compiler: - - clang - - gcc - -addons: - apt: - sources: - - ubuntu-toolchain-r-test - - llvm-toolchain-precise-3.6 - packages: - - gcc-4.8 - - g++-4.8 - - clang-3.6 - - cmake - - cmake-data - -install: - # g++4.8 - - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi - # clang 3.6 - - if [ "$CXX" == "clang++" ]; then export CXX="clang++-3.6"; fi - -before_script: - - mkdir build - - cd build - - cmake .. - -script: - - make - - make test