ci: binaries-mac: switch to ghcup for setup, like linux

This commit is contained in:
Simon Michael 2024-04-17 13:18:18 -10:00
parent 5c36a297dc
commit 82cc77f184
2 changed files with 25 additions and 35 deletions

View File

@ -115,17 +115,19 @@ jobs:
${{ runner.os }}-hledger-web-stack-work-from20220817
if: env.CONTINUE
# actions:
- name: Install stack
# run: |
# brew install haskell-stack
# $stack --version
- name: Add .ghcup/bin to PATH for following steps
run: |
mkdir -p ~/.local/bin
export PATH=~/.local/bin:$PATH
# brew install gnu-tar; curl -sL https://get.haskellstack.org/stable/osx-arm64.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-arm64.tar.gz | gtar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack; fi
echo "$HOME/.ghcup/bin/" >> $GITHUB_PATH
- name: Install stack with ghcup if needed
run: |
if [[ ! -x ~/.ghcup/bin/ghcup ]]; then
mkdir -p ~/.ghcup/bin && curl https://downloads.haskell.org/~ghcup/aarch64-apple-darwin-ghcup > ~/.ghcup/bin/ghcup && chmod +x ~/.ghcup/bin/ghcup
fi
ghcup --version
if [[ ! -x ~/.ghcup/bin/stack ]]; then
~/.ghcup/bin/ghcup install stack 2.15.5 && ~/.ghcup/bin/ghcup set stack 2.15.5
fi
stack --version
if: env.CONTINUE
@ -143,13 +145,6 @@ jobs:
# echo "$HOME/.ghcup/bin/" >> $GITHUB_PATH
# if: env.CONTINUE
# - name: Install GHC (from haskell.org)
# run: |
# curl -sL https://downloads.haskell.org/~ghc/9.2.4/ghc-9.2.4-arm64-apple-darwin.tar.xz | tar xj && cd ghc-9.2.4-arm64-apple-darwin && ./configure && make install
# ghc --version
# mkdir -p ~/.stack && printf "system-ghc: true\ninstall-ghc: false\n" >>~/.stack/config.yaml
# if: env.CONTINUE
- name: Install haskell deps
env:
stack: ${{ matrix.plan.stack }}

View File

@ -115,21 +115,23 @@ jobs:
${{ runner.os }}-hledger-web-stack-work-from20220817
if: env.CONTINUE
# actions:
- name: Install stack
# run: |
# brew install haskell-stack
# $stack --version
- name: Add .ghcup/bin to PATH for following steps
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
echo "$HOME/.ghcup/bin/" >> $GITHUB_PATH
- name: Install stack with ghcup if needed
run: |
if [[ ! -x ~/.ghcup/bin/ghcup ]]; then
mkdir -p ~/.ghcup/bin && curl https://downloads.haskell.org/~ghcup/x86_64-apple-darwin-ghcup > ~/.ghcup/bin/ghcup && chmod +x ~/.ghcup/bin/ghcup
fi
ghcup --version
if [[ ! -x ~/.ghcup/bin/stack ]]; then
~/.ghcup/bin/ghcup install stack 2.15.5 && ~/.ghcup/bin/ghcup set stack 2.15.5
fi
stack --version
if: env.CONTINUE
- name: Install GHC (with stack)
- name: Install GHC with stack
env:
stack: ${{ matrix.plan.stack }}
run: |
@ -143,13 +145,6 @@ jobs:
# echo "$HOME/.ghcup/bin/" >> $GITHUB_PATH
# if: env.CONTINUE
# - name: Install GHC (from haskell.org)
# run: |
# curl -sL https://downloads.haskell.org/~ghc/9.2.4/ghc-9.2.4-x86_64-apple-darwin.tar.xz | tar xj && cd ghc-9.2.4-x86_64-apple-darwin && ./configure && make install
# ghc --version
# mkdir -p ~/.stack && printf "system-ghc: true\ninstall-ghc: false\n" >>~/.stack/config.yaml
# if: env.CONTINUE
- name: Install haskell deps
env:
stack: ${{ matrix.plan.stack }}