-
Notifications
You must be signed in to change notification settings - Fork 10
75 lines (62 loc) · 2.15 KB
/
backblaze.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Binaries (Backblaze)
defaults:
run:
shell: bash
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
environment: [email protected]
strategy:
fail-fast: false
matrix:
ghc: ["8.10.7"]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: haskell/actions/setup@v2
id: setup-haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: 3.8.1.0
- name: Set some window specific things
if: matrix.os == 'windows-latest'
run: echo 'EXE_EXT=.exe' >> $GITHUB_ENV
- name: Configure project
run: |
cabal configure --enable-tests --enable-benchmarks --write-ghc-environment-files=ghc8.4.4+
cabal build all --dry-run
- name: Cabal cache over S3
uses: action-works/cabal-cache-s3@v1
env:
AWS_ACCESS_KEY_ID: ${{ secrets.BACKBLAZE_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.BACKBLAZE_AWS_SECRET_ACCESS_KEY }}
with:
region: us-west-2
dist-dir: dist-newstyle
store-path: ${{ steps.setup-haskell.outputs.cabal-store }}
threads: 16
archive-uri: ${{ secrets.BACKBLAZE_BINARY_CACHE_URI }}
host-name: s3.us-west-004.backblazeb2.com
host-port: 443
host-ssl: "True"
skip: "${{ secrets.BINARY_CACHE_URI == '' }}"
- name: Cabal cache over HTTPS
uses: action-works/cabal-cache-s3@v1
with:
dist-dir: dist-newstyle
store-path: ${{ steps.setup-haskell.outputs.cabal-store }}
threads: 16
archive-uri: https://cache.haskellworks.io/archive
- name: Build
# Try building it twice in case of flakey builds on Windows
run: |
cabal build all --enable-tests --enable-benchmarks --write-ghc-environment-files=ghc8.4.4+ || \
cabal build all --enable-tests --enable-benchmarks --write-ghc-environment-files=ghc8.4.4+ -j1
- name: Test
run: |
cabal test all --enable-tests --enable-benchmarks --write-ghc-environment-files=ghc8.4.4+