Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement OS selection #26

Merged
merged 7 commits into from
Jan 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ on:
jobs:
generate-matrix:
name: "Generate matrix from cabal"
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
runs-on: ubuntu-latest
steps:
- name: Extract the tested GHC versions
uses: kleidukos/[email protected]
id: set-matrix
uses: kleidukos/get-tested@f111f862f481884c26faa691de3c51ae110cc766
with:
cabal-file: get-tested.cabal
ubuntu: true
version: 0.1.6.0
tests:
name: ${{ matrix.ghc }} on ${{ matrix.os }}
needs: generate-matrix
Expand All @@ -27,7 +31,7 @@ jobs:
uses: actions/checkout@v4
- name: Set up Haskell
id: setup-haskell
uses: haskell/actions/setup@v2
uses: haskell-actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: 'latest'
Expand Down
7 changes: 4 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ inputs:
cabal-file:
description: "The path to your cabal file, e.g. somefolder/myproject.cabal"
required: true
version:
description: "Version of the tool"
required: true
windows:
description: "Enable Windows runner"
required: false
Expand Down Expand Up @@ -32,8 +35,7 @@ runs:
shell: bash
run: |
# Extract e.g. 0.1 from /runner/foo/bar/.../v0.1
export version=$(basename $GITHUB_ACTION_PATH | tail -c +2)
wget -q https://github.com/Kleidukos/get-tested/releases/download/v${version}/get-tested-${version}-linux-amd64 -O get-tested
wget -q https://github.com/Kleidukos/get-tested/releases/download/v${{ inputs.version }}/get-tested-${{ inputs.version }}-linux-amd64 -O get-tested
chmod +x get-tested

echo "::debug:: Windows enabled: ${{ inputs.windows }}"
Expand All @@ -55,7 +57,6 @@ runs:
id: set-matrix
shell: bash
run: |
./get-tested $WINDOWS $MACOS $UBUNTU ${{ inputs.cabal-file }}
./get-tested $WINDOWS $MACOS $UBUNTU ${{ inputs.cabal-file }} >> $GITHUB_OUTPUT

branding:
Expand Down
Loading