From bad8bd419e0f98dbbda2abfd75567e6157c9898a Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Tue, 8 Jun 2021 14:52:28 +0300 Subject: [PATCH] Replace Travis CI with Github Actions using own runner --- .github/workflows/kvazaar.yml | 83 ++++++++++++++++++++ .github/workflows/pull_request.yml | 117 +++++++++++++++++++++++++++++ .travis.yml | 53 ------------- README.md | 2 +- 4 files changed, 201 insertions(+), 54 deletions(-) create mode 100644 .github/workflows/kvazaar.yml create mode 100644 .github/workflows/pull_request.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/kvazaar.yml b/.github/workflows/kvazaar.yml new file mode 100644 index 00000000..323abb21 --- /dev/null +++ b/.github/workflows/kvazaar.yml @@ -0,0 +1,83 @@ +name: Kvazaar_tests + +on: + push: + pull_request: + types: [closed] + +jobs: + basic-test: + runs-on: self-hosted + + steps: + - uses: actions/checkout@v2 + - name: configure + run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) + - name: make + run: make -j + - name: Run tests + run: export PATH="/home/docker/bin:${PATH}" && make check -j VERBOSE=1 + + test-ubsan: + runs-on: self-hosted + env: + CC: gcc + CFLAGS: -fsanitize=undefined -fno-sanitize-recover=all -fno-sanitize=alignment + + steps: + - uses: actions/checkout@v2 + - name: configure + run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) + - name: make + run: make -j + - name: Run tests + run: export PATH="/home/docker/bin:${PATH}" && make check -j4 VERBOSE=1 + + test-asan: + runs-on: self-hosted + env: + CC: gcc + CFLAGS: -fsanitize=address + ASAN_OPTIONS: detect_leaks=0 + # AddressSanitizer adds some extra symbols so we expect a failure from + # the external symbols test. + XFAIL_TESTS: test_external_symbols.sh + + steps: + - uses: actions/checkout@v2 + - name: configure + run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) + - name: make + run: make -j + - name: Run tests + run: export PATH="/home/docker/bin:${PATH}" && make check -j4 VERBOSE=1 + + test-tsan: + runs-on: self-hosted + env: + CC: gcc + CFLAGS: -fsanitize=thread + + steps: + - uses: actions/checkout@v2 + - name: configure + run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) + - name: make + run: make -j + - name: Run tests + run: export PATH="/home/docker/bin:${PATH}" && make check -j4 VERBOSE=1 + + test-valgrind: + runs-on: self-hosted + + env: + KVAZAAR_OVERRIDE_angular_pred: generic + + steps: + - uses: actions/checkout@v2 + - name: configure + run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) + - name: make + run: make -j + - name: Run tests + run: export PATH="/home/docker/bin:${PATH}" && KVZ_TEST_VALGRIND=1 make check -j4 VERBOSE=1 diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 00000000..d1308a6b --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,117 @@ +name: Kvazaar_pr_tests + +on: + pull_request_target: + types: [labeled] + +jobs: + basic-test: + runs-on: self-hosted + + if: contains(github.event.pull_request.labels.*.name, 'safe to test') + steps: + - uses: actions/checkout@v2 + with: + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + - name: configure + run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) + - name: make + run: make -j + - name: Run tests + run: export PATH="/home/docker/bin:${PATH}" && make check -j VERBOSE=1 + + basic-test: + runs-on: self-hosted + if: contains(github.event.pull_request.labels.*.name, 'safe to test') + steps: + - uses: actions/checkout@v2 + with: + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + - name: configure + run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) + - name: make + run: make -j + - name: Run tests + run: export PATH="/home/docker/bin:${PATH}" && make check -j VERBOSE=1 + + test-ubsan: + runs-on: self-hosted + if: contains(github.event.pull_request.labels.*.name, 'safe to test') + env: + CC: gcc + CFLAGS: -fsanitize=undefined -fno-sanitize-recover=all -fno-sanitize=alignment + + steps: + - uses: actions/checkout@v2 + with: + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + - name: configure + run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) + - name: make + run: make -j + - name: Run tests + run: export PATH="/home/docker/bin:${PATH}" && make check -j4 VERBOSE=1 + + test-asan: + runs-on: self-hosted + if: contains(github.event.pull_request.labels.*.name, 'safe to test') + env: + CC: gcc + CFLAGS: -fsanitize=address + ASAN_OPTIONS: detect_leaks=0 + # AddressSanitizer adds some extra symbols so we expect a failure from + # the external symbols test. + XFAIL_TESTS: test_external_symbols.sh + + steps: + - uses: actions/checkout@v2 + with: + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + - name: configure + run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) + - name: make + run: make -j + - name: Run tests + run: export PATH="/home/docker/bin:${PATH}" && make check -j4 VERBOSE=1 + + test-tsan: + runs-on: self-hosted + if: contains(github.event.pull_request.labels.*.name, 'safe to test') + env: + CC: gcc + CFLAGS: -fsanitize=thread + + steps: + - uses: actions/checkout@v2 + with: + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + - name: configure + run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) + - name: make + run: make -j + - name: Run tests + run: export PATH="/home/docker/bin:${PATH}" && make check -j4 VERBOSE=1 + + test-valgrind: + runs-on: self-hosted + if: contains(github.event.pull_request.labels.*.name, 'safe to test') + + env: + KVAZAAR_OVERRIDE_angular_pred: generic + + steps: + - uses: actions/checkout@v2 + with: + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + - name: configure + run: ./autogen.sh && ./configure --enable-werror || (cat config.log && false) + - name: make + run: make -j + - name: Run tests + run: export PATH="/home/docker/bin:${PATH}" && KVZ_TEST_VALGRIND=1 make check -j4 VERBOSE=1 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c75bdd68..00000000 --- a/.travis.yml +++ /dev/null @@ -1,53 +0,0 @@ -language: c - -# Use container based infrastructure. -sudo: false - -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - autoconf - - gcc-4.8 - - libtool - - valgrind - - yasm - -matrix: - fast_finish: true - - include: - - compiler: clang - env: KVZ_TEST_VALGRIND=1 KVAZAAR_OVERRIDE_angular_pred=generic - - - compiler: clang - env: CFLAGS='-fsanitize=thread' - - - compiler: clang - env: CFLAGS='-fsanitize=undefined -fno-sanitize-recover=all -fno-sanitize=alignment' - - - compiler: gcc-4.8 - env: CFLAGS='-fsanitize=address' - - # We have some Mac specific code and Mac sometimes has odd build issues. - - os: osx - compiler: clang # gcc is actually clang on Travis OS X - install: true - script: - - ./autogen.sh - - ./configure --enable-werror || (cat config.log && false) - - make --jobs=2 V=1 - - make check TESTS=kvazaar_tests - -install: bash .travis-install.bash - -script: - - ./autogen.sh - - ./configure --enable-werror || (cat config.log && false) - - make --jobs=2 V=1 - - make check VERBOSE=1 - -after_script: - # Disable errors to work around Travis not knowing how to fix their stuff. - - set +e diff --git a/README.md b/README.md index 3700e366..bdbdaeda 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Kvazaar is still under development. Speed and RD-quality will continue to improv http://ultravideo.fi/#encoder for more information. -- Linux/Mac [![Build Status](https://travis-ci.org/ultravideo/kvazaar.svg?branch=master)](https://travis-ci.org/ultravideo/kvazaar) +- Linux [![Kvazaar_tests](https://github.com/ultravideo/kvazaar/actions/workflows/kvazaar.yml/badge.svg)](https://github.com/ultravideo/kvazaar/actions/workflows/kvazaar.yml) - Windows [![Build status](https://ci.appveyor.com/api/projects/status/88sg1h25lp0k71pu?svg=true)](https://ci.appveyor.com/project/Ultravideo/kvazaar) ## Table of Contents