Skip to content

Commit

Permalink
Merge pull request #116 from rzk-lang/update-to-ghc-9.6
Browse files Browse the repository at this point in the history
Update to GHC 9.6, latest Stackage Nightly, and use BNFC in setup
  • Loading branch information
fizruk committed Oct 1, 2023
2 parents 554984e + 86d28ee commit d1a1085
Show file tree
Hide file tree
Showing 31 changed files with 456 additions and 364 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
@@ -0,0 +1,3 @@
rzk/grammar/Syntax.cf linguist-language=EBNF linguist-detectable=true
rzk/src/Language/Rzk/Syntax/* linguist-generated=true
docs/** linguist-documentation=true
68 changes: 0 additions & 68 deletions .github/workflows/binaries.yml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/build-test.yml

This file was deleted.

106 changes: 106 additions & 0 deletions .github/workflows/ghc.yml
@@ -0,0 +1,106 @@
name: GHC (build, test, haddock)

# Controls when the workflow will run
on:
push:
branches: [main, develop]
tags: [v*]
paths:
- .github/workflows/ghcjs.yml
- rzk/**
- stack.yaml
- rzk.yaml
- "**/*.rzk.md"
- "**/*.rzk"
- "**/*.rzk.tex"
pull_request:
branches: [develop]
paths:
- .github/workflows/ghcjs.yml
- rzk/**
- stack.yaml
- rzk.yaml
- "**/*.rzk.md"
- "**/*.rzk"
- "**/*.rzk.tex"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

permissions:
contents: write

jobs:
build:
name: "Build and test with GHC"
runs-on: ubuntu-latest

steps:
- name: 📥 Checkout repository
uses: actions/checkout@v3

- name: 🧰 Setup Stack
uses: freckle/stack-action@v4

- name: Tar and strip the binary
run: |
mkdir -p bin/
cp $(stack exec -- which rzk) bin/.
tar -cvzf rzk-bin.tar.gz bin/
- name: Upload rzk binary as Artifact
uses: actions/upload-artifact@v3
with:
path: rzk-bin.tar.gz
name: rzk-bin
if-no-files-found: error

haddock:
needs: [build]
if: ${{ github.ref_name == 'develop' }}
name: "Build and upload Haddock documentation (develop)"
runs-on: ubuntu-latest

steps:
- name: 📥 Checkout repository
uses: actions/checkout@v3

- name: 🧰 Setup Stack
uses: freckle/stack-action@v4

- name: 🔨 Build Haddock Documentation (with Stack)
run: |
stack haddock
mkdir -p dist/haddock
mv $(stack path --local-doc-root)/* dist/haddock
- name: 🚀 Publish Haddock Documentation
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
folder: dist/haddock
target-folder: haddock
single-commit: true

rzk:
needs: [build]
name: "Check Rzk formalizations"
runs-on: ubuntu-latest

steps:
- name: 📥 Checkout repository
uses: actions/checkout@v3

- name: 📥 Download rzk
id: download
uses: actions/download-artifact@v3
with:
name: rzk-bin

- name: Unpack rzk-bin.tar.gz
run: |
tar xzf ${{ steps.download.outputs.download-path}}/rzk-bin.tar.gz
- name: Check Rzk files
run: ./bin/rzk typecheck docs/docs/examples/recId.rzk.md # FIXME: rely on rzk.yaml instead
shell: bash
12 changes: 7 additions & 5 deletions .github/workflows/ghcjs.yml
@@ -1,4 +1,4 @@
name: Build with GHCJS and Deploy to GitHub Pages
name: GHCJS (build and deploy Rzk playground)

on:
push:
Expand All @@ -10,23 +10,25 @@ on:
- rzk-js/**
- rzk-playground/**
- stack.yaml
- '**/*.nix'
- "**/*.nix"
pull_request:
branches: [main, develop]
branches: [develop]
paths:
- .github/workflows/ghcjs.yml
- rzk/**
- rzk-js/**
- rzk-playground/**
- stack.yaml
- '**/*.nix'
- "**/*.nix"

workflow_dispatch: # allow triggering this workflow manually

permissions:
contents: write

jobs:
build-and-deploy:
build-and-deploy-with-ghcjs:
name: "Build with GHCJS (and deploy Rzk playground)"
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout repository
Expand Down
57 changes: 0 additions & 57 deletions .github/workflows/hackage.yml

This file was deleted.

65 changes: 0 additions & 65 deletions .github/workflows/haddock.yml

This file was deleted.

0 comments on commit d1a1085

Please sign in to comment.