1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Switch from Travis CI to GitHub Actions

Travis have been slow and the macOS runner is outdated (and a bunch of
other recurring issues).
This commit is contained in:
William Wennerström 2020-12-17 14:07:07 +01:00
parent 881b99c062
commit 81c02d1231
No known key found for this signature in database
GPG Key ID: E1382990BEDD319B
3 changed files with 36 additions and 58 deletions

36
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,36 @@
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
linux:
runs-on: ubuntu-latest
strategy:
matrix:
flavor: [arch, debian, fedora, tumbleweed, ubuntu]
name: Linux
steps:
- uses: actions/checkout@v2
- name: Run tests
run: |
docker build -f Dockerfile.${{ matrix.flavor }} -t profanity .
docker run profanity ./ci-build.sh
macos:
runs-on: macos-latest
name: macOS
steps:
- uses: actions/checkout@v2
- name: Run brew bundle
run: brew bundle
- name: Run tests
env:
# Ensure that "keg-only" Homebrew versions are used.
PKG_CONFIG_PATH: "/usr/local/opt/ncurses/lib/pkgconfig:/usr/local/opt/expat/lib/pkgconfig:/usr/local/opt/curl/lib/pkgconfig:/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/sqlite/lib/pkgconfig:$PKG_CONFIG_PATH"
run: ./ci-build.sh

View File

@ -1,58 +0,0 @@
dist: bionic
language: bash
services:
- docker # Linux tests are run in Docker containers.
addons:
homebrew:
brewfile: Brewfile.travis # mac OS dependencies.
# libsignal-protocol-c is still not in the Travis CI Homebrew snapshot, the
# line below could be removed when the snapshot has been updated to speed up
# the OSX job.
update: true
matrix:
include:
- os: linux
env: BUILD_FLAVOR=tumbleweed
# - os: linux
# env: BUILD_FLAVOR=debian
# - os: linux
# env: BUILD_FLAVOR=ubuntu
- os: linux
env: BUILD_FLAVOR=arch
# - os: linux
# env: BUILD_FLAVOR=fedora
# - os: osx
# env:
# Ensure that "keg-only" Homebrew versions are used.
# - PKG_CONFIG_PATH="/usr/local/opt/ncurses/lib/pkgconfig:$PKG_CONFIG_PATH"
# - PKG_CONFIG_PATH="/usr/local/opt/expat/lib/pkgconfig:$PKG_CONFIG_PATH"
# - PKG_CONFIG_PATH="/usr/local/opt/curl/lib/pkgconfig:$PKG_CONFIG_PATH"
# - PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig:$PKG_CONFIG_PATH"
# - PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH"
# - PKG_CONFIG_PATH="/usr/local/opt/sqlite/lib/pkgconfig:$PKG_CONFIG_PATH"
before_install:
- >
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
# Ensure that Travis uses the latest version of Docker.
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
docker build -f Dockerfile."$BUILD_FLAVOR" -t profanity .
fi
script:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
docker run -it profanity ./ci-build.sh;
fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
./ci-build.sh;
fi
after_failure:
- cat ./config.log
- env