Skip to content

Commit

Permalink
Setup Stack 8
Browse files Browse the repository at this point in the history
  • Loading branch information
fabasoad committed Aug 2, 2024
1 parent 13b32a1 commit b297f21
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/functional-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ jobs:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
- name: Setup Kitten
id: setup-kitten
continue-on-error: true
uses: ./
- name: Run script
if: ${{ steps.setup-kitten.outcome == 'success' }}
run: kitten ./hello-world.ktn
- name: Validate outcome
run: |
if [ "${RUNNER_OS}" != "macOS" ] && [ "${{ steps.setup-kitten.outcome }}" = "failure" ]; then
exit 1
fi
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ This action sets up a [Kitten](http://kittenlang.org/).

## Prerequisites

The following tools have to be installed for successful work of this GitHub action:
[git](https://git-scm.com), [stack](https://docs.haskellstack.org/en/stable).
None.

> `macOS` is not supported at this moment
## Example usage

Expand Down
12 changes: 5 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ branding:
runs:
using: "composite"
steps:
- name: Fail
if: ${{ runner.os == 'macOS' }}
run: echo "::error::${RUNNER_OS} ${RUNNER_ARCH} is not supported" && exit 1
shell: sh
- name: Collect info
id: info
run: |
Expand All @@ -23,12 +27,7 @@ runs:
shell: sh
- name: Setup Stack
if: ${{ steps.info.outputs.stack-installed == 'false' }}
run: |
if [ "${RUNNER_OS}" = "macOS" ]; then
brew install llvm@12
echo "/opt/homebrew/opt/llvm@12/bin" >> "$GITHUB_PATH"
fi
curl -sSL https://get.haskellstack.org/ | sh
run: curl -sSL https://get.haskellstack.org/ | sh
shell: sh
- name: Clone Kitten repository
if: ${{ steps.info.outputs.kitten-installed == 'false' }}
Expand All @@ -40,7 +39,6 @@ runs:
- name: Build Kitten
if: ${{ steps.info.outputs.kitten-installed == 'false' }}
run: |
stack --version
stack setup --stack-yaml stack.yaml
stack build --stack-yaml stack.yaml
shell: sh
Expand Down

0 comments on commit b297f21

Please sign in to comment.