Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9f65489

Browse files
sjakobitreeowl
authored andcommitted
Switch to GitHub actions for CI
1 parent 725e18e commit 9f65489

File tree

4 files changed

+180
-171
lines changed

4 files changed

+180
-171
lines changed

‎.github/workflows/haskell-ci.yml

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
# This GitHub workflow config has been generated by a script via
2+
#
3+
# haskell-ci 'github' '--config=cabal.haskell-ci' 'cabal.project'
4+
#
5+
# To regenerate the script (for example after adjusting tested-with) run
6+
#
7+
# haskell-ci regenerate
8+
#
9+
# For more information, see https://github.com/haskell-CI/haskell-ci
10+
#
11+
# version: 0.11.20210111
12+
#
13+
# REGENDATA ("0.11.20210111",["github","--config=cabal.haskell-ci","cabal.project"])
14+
#
15+
name: Haskell-CI
16+
on:
17+
push:
18+
branches:
19+
- master
20+
pull_request:
21+
branches:
22+
- master
23+
jobs:
24+
linux:
25+
name: Haskell-CI Linux - GHC ${{ matrix.ghc }}
26+
runs-on: ubuntu-18.04
27+
container:
28+
image: buildpack-deps:bionic
29+
continue-on-error: ${{ matrix.allow-failure }}
30+
strategy:
31+
matrix:
32+
include:
33+
- ghc: 8.10.3
34+
allow-failure: false
35+
- ghc: 8.8.4
36+
allow-failure: false
37+
- ghc: 8.6.5
38+
allow-failure: false
39+
- ghc: 8.4.4
40+
allow-failure: false
41+
- ghc: 8.2.2
42+
allow-failure: false
43+
- ghc: 8.0.2
44+
allow-failure: false
45+
- ghc: 7.10.3
46+
allow-failure: false
47+
- ghc: 7.8.4
48+
allow-failure: false
49+
- ghc: 7.6.3
50+
allow-failure: false
51+
fail-fast: false
52+
steps:
53+
- name: apt
54+
run: |
55+
apt-get update
56+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common
57+
apt-add-repository -y 'ppa:hvr/ghc'
58+
apt-get update
59+
apt-get install -y ghc-$GHC_VERSION cabal-install-3.2
60+
env:
61+
GHC_VERSION: ${{ matrix.ghc }}
62+
- name: Set PATH and environment variables
63+
run: |
64+
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
65+
echo "LANG=C.UTF-8" >> $GITHUB_ENV
66+
echo "CABAL_DIR=$HOME/.cabal" >> $GITHUB_ENV
67+
echo "CABAL_CONFIG=$HOME/.cabal/config" >> $GITHUB_ENV
68+
HC=/opt/ghc/$GHC_VERSION/bin/ghc
69+
echo "HC=$HC" >> $GITHUB_ENV
70+
echo "HCPKG=/opt/ghc/$GHC_VERSION/bin/ghc-pkg" >> $GITHUB_ENV
71+
echo "HADDOCK=/opt/ghc/$GHC_VERSION/bin/haddock" >> $GITHUB_ENV
72+
echo "CABAL=/opt/cabal/3.2/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV
73+
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * 1ドル + 100 * 2ドル + (3ドル == 0 ? 5ドル != 1 : 3ドル))')
74+
echo "HCNUMVER=$HCNUMVER" >> $GITHUB_ENV
75+
echo "ARG_TESTS=--enable-tests" >> $GITHUB_ENV
76+
if [ $((HCNUMVER >= 70800)) -ne 0 ] ; then echo "ARG_BENCH=--enable-benchmarks" >> $GITHUB_ENV ; else echo "ARG_BENCH=--disable-benchmarks" >> $GITHUB_ENV ; fi
77+
echo "ARG_COMPILER=--ghc --with-compiler=/opt/ghc/$GHC_VERSION/bin/ghc" >> $GITHUB_ENV
78+
echo "GHCJSARITH=0" >> $GITHUB_ENV
79+
env:
80+
GHC_VERSION: ${{ matrix.ghc }}
81+
- name: env
82+
run: |
83+
env
84+
- name: write cabal config
85+
run: |
86+
mkdir -p $CABAL_DIR
87+
cat >> $CABAL_CONFIG <<EOF
88+
remote-build-reporting: anonymous
89+
write-ghc-environment-files: never
90+
remote-repo-cache: $CABAL_DIR/packages
91+
logs-dir: $CABAL_DIR/logs
92+
world-file: $CABAL_DIR/world
93+
extra-prog-path: $CABAL_DIR/bin
94+
symlink-bindir: $CABAL_DIR/bin
95+
installdir: $CABAL_DIR/bin
96+
build-summary: $CABAL_DIR/logs/build.log
97+
store-dir: $CABAL_DIR/store
98+
install-dirs user
99+
prefix: $CABAL_DIR
100+
repository hackage.haskell.org
101+
url: http://hackage.haskell.org/
102+
EOF
103+
cat $CABAL_CONFIG
104+
- name: versions
105+
run: |
106+
$HC --version || true
107+
$HC --print-project-git-commit-id || true
108+
$CABAL --version || true
109+
- name: update cabal index
110+
run: |
111+
$CABAL v2-update -v
112+
- name: install cabal-plan
113+
run: |
114+
mkdir -p $HOME/.cabal/bin
115+
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2.0/cabal-plan-0.6.2.0-x86_64-linux.xz > cabal-plan.xz
116+
echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
117+
xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
118+
rm -f cabal-plan.xz
119+
chmod a+x $HOME/.cabal/bin/cabal-plan
120+
cabal-plan --version
121+
- name: checkout
122+
uses: actions/checkout@v2
123+
with:
124+
path: source
125+
- name: sdist
126+
run: |
127+
mkdir -p sdist
128+
cd source || false
129+
$CABAL sdist all --output-dir $GITHUB_WORKSPACE/sdist
130+
- name: unpack
131+
run: |
132+
mkdir -p unpacked
133+
find sdist -maxdepth 1 -type f -name '*.tar.gz' -exec tar -C $GITHUB_WORKSPACE/unpacked -xzvf {} \;
134+
- name: generate cabal.project
135+
run: |
136+
PKGDIR_containers="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/containers-[0-9.]*')"
137+
echo "PKGDIR_containers=${PKGDIR_containers}" >> $GITHUB_ENV
138+
PKGDIR_containers_tests="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/containers-tests-[0-9.]*')"
139+
echo "PKGDIR_containers_tests=${PKGDIR_containers_tests}" >> $GITHUB_ENV
140+
touch cabal.project
141+
touch cabal.project.local
142+
echo "packages: ${PKGDIR_containers}" >> cabal.project
143+
echo "packages: ${PKGDIR_containers_tests}" >> cabal.project
144+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package containers" >> cabal.project ; fi
145+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
146+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package containers-tests" >> cabal.project ; fi
147+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
148+
cat >> cabal.project <<EOF
149+
EOF
150+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(binary|containers|containers-tests|text)$/; }' >> cabal.project.local
151+
cat cabal.project
152+
cat cabal.project.local
153+
- name: dump install plan
154+
run: |
155+
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
156+
cabal-plan
157+
- name: cache
158+
uses: actions/cache@v2
159+
with:
160+
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
161+
path: ~/.cabal/store
162+
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
163+
- name: build w/o tests
164+
run: |
165+
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
166+
- name: build
167+
run: |
168+
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
169+
- name: tests
170+
run: |
171+
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
172+
- name: haddock
173+
run: |
174+
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all ; fi
175+
- name: unconstrained build
176+
run: |
177+
rm -f cabal.project.local
178+
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all

‎.travis.yml

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

‎containers-tests/containers-tests.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ extra-source-files:
2626
benchmarks/LookupGE/*.hs
2727

2828
tested-with:
29-
GHC ==7.6.3 || ==7.8.4 || ==7.10.3 || ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.2 || ==8.10.1
29+
GHC ==7.6.3 || ==7.8.4 || ==7.10.3 || ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.3
3030

3131
source-repository head
3232
type: git

‎containers/containers.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ extra-source-files:
2525
include/containers.h
2626
changelog.md
2727

28-
tested-with: GHC==8.10.1, GHC==8.8.2, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3
28+
tested-with: GHC==8.10.3, GHC==8.8.4, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3
2929

3030
source-repository head
3131
type: git

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /