Skip to content

Commit 8378b72

Browse files
authored
GitHub Actions (#165)
* Decomission .travis.yml * Build on Github Actions
1 parent af92f9b commit 8378b72

File tree

4 files changed

+100
-168
lines changed

4 files changed

+100
-168
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"

.github/workflows/ci.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: ci
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- 2.7
7+
pull_request: {}
8+
9+
defaults:
10+
run:
11+
shell: bash
12+
13+
jobs:
14+
build-old:
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
fail-fast: true
18+
matrix:
19+
os: [ubuntu-latest]
20+
ghc: ['7.8.4', '7.6.3', '7.4.2']
21+
steps:
22+
- uses: actions/checkout@v2
23+
- uses: actions/cache@v2
24+
name: Cache cabal stuff
25+
with:
26+
path: |
27+
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
28+
dist-newstyle
29+
key: ${{ runner.os }}-${{ matrix.ghc }}
30+
- name: Install GHC
31+
run: |
32+
sudo add-apt-repository ppa:hvr/ghc -y
33+
sudo apt-get update
34+
sudo apt-get install ghc-${{ matrix.ghc }}
35+
- name: Build
36+
run: |
37+
autoreconf -i
38+
cabal sdist -z -o .
39+
cabal get unix-*.tar.gz
40+
cd unix-*/
41+
cabal build -w /opt/ghc/bin/ghc-${{ matrix.ghc }} all
42+
- name: Haddock
43+
run: cabal haddock -w /opt/ghc/bin/ghc-${{ matrix.ghc }}
44+
45+
build:
46+
needs: build-old
47+
runs-on: ${{ matrix.os }}
48+
strategy:
49+
fail-fast: true
50+
matrix:
51+
os: [ubuntu-latest, macOS-latest]
52+
ghc: ['8.10', '8.8', '8.6', '8.4', '8.2', '8.0', '7.10']
53+
steps:
54+
- uses: actions/checkout@v2
55+
- uses: actions/setup-haskell@v1
56+
id: setup-haskell-cabal
57+
with:
58+
ghc-version: ${{ matrix.ghc }}
59+
- uses: actions/cache@v2
60+
name: Cache cabal stuff
61+
with:
62+
path: |
63+
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
64+
dist-newstyle
65+
key: ${{ runner.os }}-${{ matrix.ghc }}
66+
- name: Build
67+
run: |
68+
autoreconf -i
69+
cabal sdist -z -o .
70+
cabal get unix-*.tar.gz
71+
cd unix-*/
72+
cabal build all
73+
- name: Haddock
74+
run: cabal haddock
75+
76+
build-freebsd:
77+
needs: build
78+
# See https://github.com/vmactions/freebsd-vm#under-the-hood.
79+
runs-on: macos-latest
80+
steps:
81+
- uses: actions/checkout@v2
82+
- name: Build
83+
id: build-freebsd
84+
uses: vmactions/[email protected]
85+
with:
86+
usesh: true
87+
prepare: pkg install -y ghc hs-cabal-install git autoconf
88+
run: |
89+
autoreconf -i
90+
cabal sdist -z -o .
91+
cabal get unix-*.tar.gz
92+
cd unix-*/
93+
cabal build all

.travis.yml

Lines changed: 0 additions & 167 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The `unix` Package [![Hackage](https://img.shields.io/hackage/v/unix.svg)](https://hackage.haskell.org/package/unix) [![Build Status](https://travis-ci.org/haskell/unix.svg)](https://travis-ci.org/haskell/unix)
1+
The `unix` Package [![Hackage](https://img.shields.io/hackage/v/unix.svg)](https://hackage.haskell.org/package/unix) [![GitHub Build Status](https://github.com/haskell/unix/workflows/ci/badge.svg)](https://github.com/haskell/unix/actions?query=workflow%3Aci)
22
==================
33

44
See [`unix` on Hackage](http://hackage.haskell.org/package/unix) for

0 commit comments

Comments
 (0)