Skip to content

Commit 7d61b77

Browse files
authored
Use vanilla container for Haskell CI step (#22)
- avoids using the glean-specific images, which have extra stuff on them - use the haskell standard actions from https://github.com/haskell/actions/ - pass -j2 to speed up build perhaps
1 parent 2e57957 commit 7d61b77

File tree

1 file changed

+13
-22
lines changed

1 file changed

+13
-22
lines changed

.github/workflows/haskell.yml

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,41 +10,32 @@ jobs:
1010
ci:
1111
strategy:
1212
fail-fast: false
13-
matrix:
14-
ghc: [8.10.7]
1513
runs-on: ubuntu-latest
16-
container:
17-
# Ubuntu with ghcup already installed
18-
image: ghcr.io/facebookincubator/hsthrift/ci-base:ghcup
1914
steps:
2015
- name: Checkout code
21-
uses: actions/checkout@v2
16+
uses: actions/checkout@v3
17+
- name: Set up Haskell
18+
uses: haskell/actions/setup@v2
19+
with:
20+
ghc-version: '8.10'
21+
cabal-version: 'latest'
2222
- name: Install additional tools
2323
run: |
24-
apt-get update
25-
apt install -y unzip
26-
- name: Install GHC ${{ matrix.ghc }}
27-
run: ghcup install ghc ${{ matrix.ghc }} --set
28-
- name: Install cabal-install 3.6
29-
run: ghcup install cabal 3.6.0.0 --set
30-
- name: Add GHC and cabal to PATH
31-
run: echo "$HOME/.ghcup/bin" >> "$GITHUB_PATH"
24+
sudo apt-get update
25+
sudo apt install -y unzip curl
3226
- name: Install protoc
3327
run: |
3428
PROTOC_ZIP=protoc-3.14.0-linux-x86_64.zip
3529
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/"$PROTOC_ZIP"
36-
unzip -o "$PROTOC_ZIP" -d /usr/local bin/protoc
37-
unzip -o "$PROTOC_ZIP" -d /usr/local 'include/*'
38-
rm -f $PROTOC_ZIP
39-
- name: Populate hackage index
40-
run: cabal update
41-
working-directory: bindings/haskell
30+
unzip -o "$PROTOC_ZIP" -d "$HOME/.protoc" bin/protoc
31+
unzip -o "$PROTOC_ZIP" -d "$HOME/.protoc" 'include/*'
32+
echo "$HOME/.protoc/bin" >> "$GITHUB_PATH"
4233
- name: Build proto-lens-protoc wrapper
43-
run: cabal install proto-lens-protoc
34+
run: cabal install proto-lens-protoc --ghc-options='-j2 +RTS -A32m'
4435
working-directory: bindings/haskell
4536
- name: Generate Haskell
4637
run: protoc --plugin=protoc-gen-haskell="$HOME/.cabal/bin/proto-lens-protoc" --haskell_out=src --proto_path=../.. scip.proto
4738
working-directory: bindings/haskell
4839
- name: Build source
49-
run: cabal build
40+
run: cabal build --ghc-options='-j2 +RTS -A32m'
5041
working-directory: bindings/haskell

0 commit comments

Comments
 (0)