From f9c18e80595fae26f1d45dab5427c7122d15cb35 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 26 Mar 2021 21:32:55 -0400 Subject: ci: Switch to GitHub Actions --- .gitattributes | 1 - .github/workflows/linux.yml | 35 +++++++++++++++++++++++++++++++++++ .github/workflows/macos.yml | 14 ++++++++++++++ .travis.yml | 44 -------------------------------------------- README.md | 3 ++- 5 files changed, 51 insertions(+), 46 deletions(-) create mode 100644 .github/workflows/linux.yml create mode 100644 .github/workflows/macos.yml delete mode 100644 .travis.yml diff --git a/.gitattributes b/.gitattributes index 084bde3..e4504cf 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1 @@ .git* export-ignore -.travis.yml export-ignore diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 0000000..67943f4 --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,35 @@ +name: Linux + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install dependencies + run: | + sudo dpkg --add-architecture i386 + sudo apt-get update -y + sudo apt-get install -y \ + gcc-multilib \ + acl \ + libacl1-dev \ + libacl1:i386 \ + attr \ + libattr1-dev \ + libattr1:i386 \ + libcap2-bin \ + libcap-dev \ + libcap2:i386 + # Ubuntu doesn't let you install the -dev packages for both amd64 and + # i386 at once, so we make our own symlinks to fix -m32 -lacl -lattr -lcap + sudo ln -s libacl.so.1 /lib/i386-linux-gnu/libacl.so + sudo ln -s libattr.so.1 /lib/i386-linux-gnu/libattr.so + sudo ln -s libcap.so.2 /lib/i386-linux-gnu/libcap.so + + - name: Run tests + run: | + make -j$(nproc) distcheck diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 0000000..ab359e1 --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,14 @@ +name: macOS + +on: [push, pull_request] + +jobs: + build: + runs-on: macos-latest + + steps: + - uses: actions/checkout@v2 + + - name: Run tests + run: | + make -j$(sysctl -n hw.ncpu) distcheck diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 582a0e5..0000000 --- a/.travis.yml +++ /dev/null @@ -1,44 +0,0 @@ -language: c - -dist: focal -virt: lxd -group: edge - -script: make -j$TRAVIS_NUMCORES distcheck - -addons: - apt: - packages: - - acl - - libacl1-dev - - attr - - libattr1-dev - - libcap2-bin - - libcap-dev - -jobs: - include: - - os: linux - arch: amd64 - env: &linux_env - - TMPDIR=/var/ramfs - before_script: - # Work around for https://salsa.debian.org/apt-team/apt/-/commit/998a17d7e6f834c341f198ca5b6df2f27e18df38 - - sudo apt-get -y -o APT::Immediate-Configure=false install gcc-multilib libcap2:i386 libacl1:i386 libattr1:i386 - # Ubuntu doesn't let you install the -dev packages for both amd64 and - # i386 at once, so we make our own symlinks to fix -m32 -lacl -lattr -lcap - - sudo ln -s libacl.so.1 /lib/i386-linux-gnu/libacl.so - - sudo ln -s libattr.so.1 /lib/i386-linux-gnu/libattr.so - - sudo ln -s libcap.so.2 /lib/i386-linux-gnu/libcap.so - - - os: linux - arch: ppc64le - env: *linux_env - - - os: osx - - - os: freebsd - before_script: - - sudo mount -t fdescfs fdescfs /dev/fd - - sudo ln -s ../usr/local/bin/bash /bin/bash - script: gmake -j2 distcheck diff --git a/README.md b/README.md index c33b02c..64956a2 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,8 @@ [![License](http://img.shields.io/badge/license-0BSD-blue.svg)](https://github.com/tavianator/bfs/blob/main/LICENSE) [![Version](https://img.shields.io/github/v/tag/tavianator/bfs?label=version)](https://github.com/tavianator/bfs/releases) -[![Travis CI Status](https://api.travis-ci.com/tavianator/bfs.svg?branch=main)](https://travis-ci.com/tavianator/bfs) +[![Linux CI Status](https://github.com/tavianator/bfs/actions/workflows/linux.yml/badge.svg?branch=main)](https://github.com/tavianator/bfs/actions/workflows/linux.yml) +[![macOS CI Status](https://github.com/tavianator/bfs/actions/workflows/macos.yml/badge.svg?branch=main)](https://github.com/tavianator/bfs/actions/workflows/macos.yml) Breadth-first search for your files. -- cgit v1.2.3