-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from Nike-Inc/ci/github-actions
Ci/GitHub actions
- Loading branch information
Showing
8 changed files
with
158 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: 'Install Stack' | ||
description: 'Install the Haskell Stack build tool' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install | ||
run: | | ||
export PATH=$HOME/.local/bin:$PATH | ||
mkdir -p ~/.local/bin | ||
curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Cabal Haskell Builds | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
plan: | ||
- ghc-version: '8.0.2' | ||
cabal-version: '2.0' | ||
- ghc-version: '8.2.2' | ||
cabal-version: '2.2' | ||
- ghc-version: '8.4.4' | ||
cabal-version: '2.2' | ||
- ghc-version: '8.8' | ||
cabal-version: '3.0' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cabal/packages | ||
~/.cabal/store | ||
dist-newstyle | ||
key: ${{ matrix.plan.ghc-version }} | ||
- name: Install Cabal | ||
uses: haskell/actions/setup@v1 | ||
with: | ||
ghc-version: ${{ matrix.plan.ghc-version }} | ||
cabal-version: ${{ matrix.plan.cabal-version }} | ||
- name: Install Project Dependencies (Cabal v3) | ||
run: | | ||
set -ex | ||
cabal install --lib --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 | ||
set +ex | ||
if: "startsWith(matrix.plan.cabal-version, '3')" | ||
- name: Install Project Dependencies (Cabal v2) | ||
run: | | ||
set -ex | ||
cabal install --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 | ||
set +ex | ||
if: "!startsWith(matrix.plan.cabal-version, '3')" | ||
- name: Build Project | ||
run: | | ||
set -ex | ||
cabal configure --enable-tests --ghc-options -O0 | ||
cabal build | ||
cabal test | ||
set +ex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Stack Haskell Builds | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
continue-on-error: ${{ matrix.experimental }} | ||
strategy: | ||
matrix: | ||
resolver: | ||
- lts-11 | ||
- lts-12 | ||
- lts-13 | ||
experimental: | ||
- false | ||
include: | ||
- resolver: nightly | ||
experimental: true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.stack | ||
.stack-work | ||
key: ${{ matrix.resolver }} | ||
- name: Install Stack | ||
uses: ./.github/actions/install_stack | ||
- name: Install Project Dependencies | ||
run: | | ||
set -ex | ||
stack --no-docker --no-terminal --install-ghc --resolver $RESOLVER test --bench --only-dependencies | ||
set +ex | ||
env: | ||
RESOLVER: ${{ matrix.resolver }} | ||
- name: Build Project | ||
run: | | ||
set -ex | ||
stack --no-docker --no-terminal --resolver $RESOLVER test --bench --no-run-benchmarks --haddock --no-haddock-deps | ||
set +ex | ||
env: | ||
RESOLVER: ${{ matrix.resolver }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Publish to Hackage | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v?[0-9]+.[0-9]+.[0-9]+" | ||
- "v?[0-9]+.[0-9]+.[0-9]+.[0-9]+" | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.stack | ||
.stack-work | ||
key: publish | ||
- name: Install Stack | ||
uses: ./.github/actions/install_stack | ||
# TODO: It's possible that the tag and the package version don't match, | ||
# which would indicate an error and should abort the publish | ||
- name: Publish Project | ||
run: | | ||
set -ex | ||
stack --no-docker upload . | ||
set +ex | ||
env: | ||
HACKAGE_USERNAME: ${{ secrets.HackageUsername }} | ||
HACKAGE_PASSWORD: ${{ secrets.HackagePassword }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters