Skip to content

Commit

Permalink
Merge pull request #814 from libgit2/actions
Browse files Browse the repository at this point in the history
Move the bulk of CI to Actions
  • Loading branch information
carlosmn authored Aug 16, 2019
2 parents fbf2b4b + 74e1569 commit 3de6a0a
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 5 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Rugged CI

on:
pull_request:
push:
branches:
- master
- maint/*

jobs:
build:
strategy:
fail-fast: false
matrix:
ruby: [ '2.3.7', '2.4.6', '2.5.5', '2.6.2' ]
os: [ ubuntu-18.04, macOS-10.14 ]

runs-on: ${{ matrix.os }}

name: Ruby ${{ matrix.ruby }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@master
- name: update submodule
run: git submodule update --init
- name: Install Linux packages
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y cmake libssh2-1-dev openssh-client openssh-server
- name: Install macOS packages
if: runner.os == 'macOS'
run: ./vendor/libgit2/azure-pipelines/setup-osx.sh
- name: Set up Ruby on Linux
if: runner.os == 'Linux'
uses: actions/setup-ruby@v1
with:
version: ${{ matrix.ruby }}
- name: Set up Ruby on macOS
if: runner.os == 'macOS'
run: |
brew install rbenv
rbenv install ${{ matrix.ruby }}
rbenv local ${{ matrix.ruby }}
- name: run build
run: |
if [ -x rbenv ]; then eval "$(rbenv init -)"; fi
ruby --version
gem install bundler
bundle install --path vendor
./script/travisbuild
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@ os:
- osx

rvm:
- 2.3.3
- 2.4.0
- 2.5.0
- 2.6
- ruby-head
- rbx-2

addons:
apt:
Expand Down
5 changes: 5 additions & 0 deletions script/travisbuild
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#!/bin/sh

set -ex

# Create a test repo which we can use for the online tests
mkdir $HOME/_temp
git init --bare $HOME/_temp/test.git
git daemon --listen=localhost --export-all --enable=receive-pack --base-path=$HOME/_temp $HOME/_temp 2>/dev/null &

# On Actions we start with 777 which means sshd won't let us in
chmod 750 $HOME

ssh-keygen -t rsa -f ~/.ssh/rugged_test_rsa -N "" -q
cat ~/.ssh/rugged_test_rsa.pub >>~/.ssh/authorized_keys
ssh-keyscan -t rsa localhost >>~/.ssh/known_hosts
Expand Down

0 comments on commit 3de6a0a

Please sign in to comment.