-
Notifications
You must be signed in to change notification settings - Fork 47
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
Generate test matrix from tested-with GHCs #308
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Set update schedule for GitHub Actions | ||
|
||
version: 2 | ||
updates: | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
# Check for updates to GitHub Actions every week | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,49 +9,56 @@ on: | |
- "master" | ||
|
||
jobs: | ||
build: | ||
name: ghc ${{ matrix.ghc }} | ||
generateMatrix: | ||
name: "Generate matrix from cabal" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
ghc: ["8.10", "9.0", "9.2"] | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- name: Checkout base repo | ||
uses: actions/checkout@v2 | ||
- name: Extract the tested GHC versions | ||
id: set-matrix | ||
run: | | ||
wget https://github.com/Kleidukos/get-tested/releases/download/v0.1.5.0/get-tested-0.1.5.0-linux-amd64 -O get-tested | ||
chmod +x get-tested | ||
./get-tested --ubuntu tree-sitter/tree-sitter.cabal >> $GITHUB_OUTPUT | ||
build: | ||
name: ${{ matrix.ghc }} on ${{ matrix.os }} | ||
needs: generateMatrix | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: ${{ fromJSON(needs.generateMatrix.outputs.matrix) }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main' | ||
|
||
- uses: haskell/actions/setup@v1 | ||
name: Setup Haskell | ||
with: | ||
ghc-version: ${{ matrix.ghc }} | ||
|
||
- uses: actions/cache@v2 | ||
name: Cache ~/.cabal/packages | ||
with: | ||
path: ~/.cabal/packages | ||
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-packages | ||
- uses: actions/cache@v2 | ||
name: Cache ~/.cabal/store | ||
- name: Cache | ||
uses: actions/[email protected] | ||
with: | ||
path: ~/.cabal/store | ||
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-store | ||
path: ${{ steps.setup-haskell.outputs.cabal-store }} | ||
key: ${{ runner.os }}-ghc-${{ matrix.ghc }}-cabal-${{ hashFiles('**/plan.json') }} | ||
restore-keys: ${{ runner.os }}-ghc-${{ matrix.ghc }}- | ||
- uses: actions/cache@v2 | ||
name: Cache dist-newstyle | ||
with: | ||
path: dist-newstyle | ||
key: ${{ runner.os }}-${{ matrix.ghc }}-repo-dist | ||
|
||
- name: Install dependencies | ||
run: | | ||
git submodule update -i --recursive | ||
cabal v2-update | ||
cabal v2-configure --enable-benchmarks --enable-tests --write-ghc-environment-files=always -j2 -O0 | ||
cabal v2-build --only-dependencies all | ||
cabal update | ||
cabal configure --enable-benchmarks --enable-tests --write-ghc-environment-files=always -j2 -O0 | ||
cabal build --only-dependencies all | ||
|
||
- name: Build & test | ||
run: | | ||
cabal v2-build all | ||
cabal v2-test all | ||
cabal v2-haddock all | ||
cabal v2-sdist all | ||
cabal build all | ||
cabal test all | ||
cabal haddock all | ||
cabal sdist all | ||
for p in tree-sitter* ; do echo "$p" ; cd "$p" ; cabal check ; cd ..; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,9 +17,10 @@ category: Parsing, Tree-sitter | |
build-type: Simple | ||
|
||
tested-with: | ||
GHC == 8.10.1 | ||
GHC == 9.0.1 | ||
GHC == 9.2.1 | ||
GHC == 8.10.7 | ||
GHC == 9.0.2 | ||
GHC == 9.2.8 | ||
GHC == 9.4.8 | ||
|
||
extra-source-files: vendor/tree-sitter/lib/src/**/*.c | ||
, vendor/tree-sitter/lib/src/**/*.h | ||
|
@@ -38,14 +39,10 @@ common common | |
-Wno-name-shadowing | ||
-Wno-safe | ||
-Wno-unsafe | ||
if (impl(ghc >= 8.6)) | ||
ghc-options: -Wno-star-is-type | ||
if (impl(ghc >= 8.8)) | ||
ghc-options: -Wno-missing-deriving-strategies | ||
if (impl(ghc >= 8.10)) | ||
ghc-options: | ||
-Wno-missing-safe-haskell-mode | ||
-Wno-prepositive-qualified-module | ||
-Wno-star-is-type | ||
-Wno-missing-deriving-strategies | ||
-Wno-missing-safe-haskell-mode | ||
-Wno-prepositive-qualified-module | ||
Comment on lines
+42
to
+45
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good call dropping the conditionals. |
||
if (impl(ghc >= 9.2)) | ||
ghc-options: | ||
-Wno-missing-kind-signatures | ||
|
@@ -55,7 +52,7 @@ library | |
import: common | ||
hs-source-dirs: src | ||
build-depends: | ||
, base >= 4.12 && < 5 | ||
, base >= 4.14.3.0 && < 5 | ||
, bytestring >= 0.10.8.2 && < 0.13 | ||
, containers ^>= 0.6.0.1 | ||
, directory ^>= 1.3 | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey this is cool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually in the meantime it gained a GitHub Action. I'll send a follow-up PR. :)