Skip to content

Commit

Permalink
change setup method
Browse files Browse the repository at this point in the history
  • Loading branch information
shayne-fletcher committed Jul 17, 2024
1 parent 6b406c8 commit 660cc49
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 49 deletions.
40 changes: 16 additions & 24 deletions .github/workflows/ghc-9.10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,26 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
os: [ubuntu, macos]
steps:
- uses: haskell-actions/setup@v2
with:
ghc-version: '9.8.1'
enable-stack: true
stack-version: '2.15.7'
# - name: Upgrade stack from git
# run: |-
# stack upgrade --git
# echo "$HOME/.local/bin" >> $GITHUB_PATH
# which stack
# stack --version
# shell: bash
- name: Install build tools
- name: Install build tools (macOS)
run: brew install automake
if: matrix.os == 'macos'
- name: Configure
# e.g. Don't recursively delete '.stack-work' (`stack clean --full`)
run: echo "GHCLIB_AZURE='1'" >> $GITHUB_ENV
- name: Install stack
shell: bash
run: curl -sSL https://get.haskellstack.org/ | sh -s - -f
- name: Install ghcup (unix)
shell: bash
run: |-
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_GHC_VERSION=9.8.2 BOOTSTRAP_HASKELL_CABAL_VERSION=latest BOOTSTRAP_HASKELL_INSTALL_NO_STACK=1 BOOTSTRAP_HASKELL_INSTALL_NO_STACK_HOOK=1 BOOTSTRAP_HASKELL_ADJUST_BASHRC=N sh
echo "$HOME/.ghcup/bin" >> $GITHUB_PATH
echo "$HOME/.ghcup/ghc/9.8.2/bin" >> $GITHUB_PATH
if: matrix.os == 'ubuntu' || matrix.os == 'macos'
- name: Run hlint-from-scratch (unix)
shell: bash
- name: Boot
run: |-
cabal update
cabal install apply-refact
GHCLIB_AZURE=1; export GHCLIB_AZURE
git clone https://github.com/shayne-fletcher/hlint-from-scratch.git
hlint-from-scratch/hlint-from-scratch.sh --init="$HOME/project"
shell: bash
- name: Build and Test ('ghc-9.10.1')
run: hlint-from-scratch/hlint-from-scratch.sh --ghc-flavor="ghc-9.10.1" --stack-yaml=stack-exact.yaml --resolver=ghc-9.8.1 --no-checkout
shell: bash
hlint-from-scratch/hlint-from-scratch.sh --ghc-flavor="9.10.1" --stack-yaml=stack-exact.yaml --resolver=ghc-9.8.2 --no-checkout
if: matrix.os == 'ubuntu' || matrix.os == 'macos'
43 changes: 18 additions & 25 deletions .github/workflows/ghc-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,34 @@ on:
branches:
- 'ghc-next*'
schedule:
- cron: '0 3 * * 5'
- cron: '0 8 * * 6' # once a week. saturdays at 8am
jobs:
ghc-9-10:
ghc-next:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
os: [ubuntu, macos]
steps:
- uses: haskell-actions/setup@v2
with:
ghc-version: '9.8.1'
enable-stack: true
stack-version: '2.15.7'
# - name: Upgrade stack from git
# run: |-
# stack upgrade --git
# echo "$HOME/.local/bin" >> $GITHUB_PATH
# which stack
# stack --version
# shell: bash
- name: Install build tools
- name: Install build tools (macOS)
run: brew install automake
if: matrix.os == 'macos'
- name: Configure
# e.g. Don't recursively delete '.stack-work' (`stack clean --full`)
run: echo "GHCLIB_AZURE='1'" >> $GITHUB_ENV
- name: Install stack
shell: bash
run: curl -sSL https://get.haskellstack.org/ | sh -s - -f
- name: Install ghcup (unix)
shell: bash
run: |-
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_GHC_VERSION=9.8.2 BOOTSTRAP_HASKELL_CABAL_VERSION=latest BOOTSTRAP_HASKELL_INSTALL_NO_STACK=1 BOOTSTRAP_HASKELL_INSTALL_NO_STACK_HOOK=1 BOOTSTRAP_HASKELL_ADJUST_BASHRC=N sh
echo "$HOME/.ghcup/bin" >> $GITHUB_PATH
echo "$HOME/.ghcup/ghc/9.8.2/bin" >> $GITHUB_PATH
if: matrix.os == 'ubuntu' || matrix.os == 'macos'
- name: Run hlint-from-scratch (unix)
shell: bash
- name: Boot
run: |-
cabal update
GHCLIB_AZURE=1; export GHCLIB_AZURE
git clone https://github.com/shayne-fletcher/hlint-from-scratch.git
hlint-from-scratch/hlint-from-scratch.sh --init="$HOME/project"
shell: bash
- name: Build and Test ('ghc-next')
run: hlint-from-scratch/hlint-from-scratch.sh --ghc-flavor="" --stack-yaml=stack-exact.yaml --resolver=ghc-9.8.1 --no-checkout
shell: bash
hlint-from-scratch/hlint-from-scratch.sh --ghc-flavor="ghc-master" --stack-yaml=stack-exact.yaml --resolver=ghc-9.8.2 --no-checkout
if: matrix.os == 'ubuntu' || matrix.os == 'macos'

0 comments on commit 660cc49

Please sign in to comment.