Skip to content

Fix TODOs.

Fix TODOs. #687

Workflow file for this run

# modified from https://github.com/simonmichael/hledger/blob/master/.github/workflows/mac.yml
name: CI (macOS)
on: [push, pull_request]
jobs:
build:
runs-on: macos-latest
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v2
# things to be cached/restored:
- name: 💾 Cache stack global package db
id: stack-global
uses: actions/cache@v2
with:
path: ~/.stack
key: ${{ runner.os }}-stack-global-after20210110-${{ hashFiles('**.yaml') }}
restore-keys: |
${{ runner.os }}-stack-global-after202110110
- name: 💾 Cache stack-installed programs in ~/.local/bin
id: stack-programs
uses: actions/cache@v2
with:
path: ~/.local/bin
key: ${{ runner.os }}-stack-programs-${{ hashFiles('**.yaml') }}
restore-keys: |
${{ runner.os }}-stack-programs
- name: 💾 Cache .stack-work
uses: actions/cache@v2
with:
path: .stack-work
key: ${{ runner.os }}-stack-work-${{ hashFiles('**.yaml') }}
restore-keys: |
${{ runner.os }}-stack-work
# - name: 💾 Cache gcl/.stack-work
# uses: actions/cache@v2
# with:
# path: gcl/.stack-work
# key: ${{ runner.os }}-gcl-stack-work-${{ hashFiles('gcl/package.yaml') }}
# restore-keys: |
# ${{ runner.os }}-gcl-stack-work
# actions:
- name: ⏬ Install stack
run: |
mkdir -p ~/.local/bin
export PATH=~/.local/bin:$PATH
# brew install gnu-tar; curl -sL https://get.haskellstack.org/stable/osx-x86_64.tar.gz | gtar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack
if [[ ! -x ~/.local/bin/stack ]]; then brew install gnu-tar; curl -sL https://get.haskellstack.org/stable/osx-x86_64.tar.gz | gtar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack; fi
stack --version
- name: ⏬ Install GHC
run: |
stack setup --install-ghc
- name: ⏬ Install haskell deps
run: |
stack build --only-dependencies
- name: 🔨 Build and run tests
run: |
stack test
# artifacts:
- name: 📦 Install & Gather executables
id: exes
run: |
stack install
cp ~/.local/bin/gcl .
zip -r gcl gcl
mv gcl.zip gcl-macos.zip
- name: 🚢 Release Artifacts
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/') # so that only commits with a git tag would upload artifacts
with:
files: gcl-macos.zip
draft: true
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}