Skip to content

Commit

Permalink
Merge branch 'master' into functored-ast
Browse files Browse the repository at this point in the history
  • Loading branch information
Ericson2314 authored Nov 6, 2022
2 parents 5d92ceb + 347fe49 commit f0f1c6f
Show file tree
Hide file tree
Showing 366 changed files with 8,544 additions and 4,948 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
test/fb2/reader/* -text
pandoc-lua-engine/test/*.custom -text
pandoc-lua-engine/test/*.txt -text
14 changes: 6 additions & 8 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,18 @@ labels: 'bug'
assignees: ''

---

<!--
Thank you for reporting an issue! Before you continue, please make sure that you have
- searched the issue tracker for similar issues (including closed issues): https://github.com/jgm/pandoc/issues
- searched the pandoc-discuss mailing list for solutions: https://groups.google.com/forum/#!forum/pandoc-discuss
- reproduced your issue on the latest release of pandoc, or on https://pandoc.org/try
- searched the [issue tracker](https://github.com/jgm/pandoc/issues) for similar issues (including closed issues).
- searched the [pandoc-discuss mailing list](https://groups.google.com/forum/#!forum/pandoc-discuss) for solutions.
- reproduced your issue on the [latest release of pandoc](https://github.com/jgm/pandoc/releases), or online at [try pandoc](https://pandoc.org/try).
Note that this bug tracker is for reporting bugs, not asking questions. For questions, use the pandoc-discuss mailing list.
Note that this bug tracker is for reporting bugs, not asking questions. For questions, use the [pandoc-discuss mailing list](https://groups.google.com/forum/#!forum/pandoc-discuss).
-->

**Explain the problem.**
Include the exact command line you used and all inputs necessary to reproduce the issue. Please create as minimal an example as possible, to help the maintainers isolate the problem. Explain the output you received and how it differs from what you expected.
Include the **exact command line** you used and **all inputs necessary to reproduce the issue**. Please create as minimal an example as possible, to help the maintainers isolate the problem. Explain the output you received and how it differs from what you expected.

**Pandoc version?**
What version of pandoc are you using, on what OS?

What version of pandoc are you using, on what OS? (If it's not the latest release, please try with the latest release before reporting the issue.)
58 changes: 58 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: benchmarks

on: workflow_dispatch

permissions:
contents: read

jobs:
benchmark:

runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
versions:
- ghc: '8.10.7'
cabal: '3.2'
- ghc: '9.2.2'
cabal: '3.6'
steps:
- uses: actions/checkout@v3

- name: Install cabal/ghc
run: |
ghcup install ghc --set ${{ matrix.versions.ghc }}
ghcup install cabal ${{ matrix.versions.cabal }}
# declare/restore cached things

- name: Cache cabal global package db
id: cabal-global
uses: actions/cache@v3
with:
path: |
~/.cabal
key: benchmark-${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-global-${{ secrets.CACHE_VERSION }}

- name: Cache cabal work
id: cabal-local
uses: actions/cache@v3
with:
path: |
dist-newstyle
key: benchmark-${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-local-${{ secrets.CACHE_VERSION }}

- name: Install dependencies
run: |
v2=$([ "${{ matrix.versions.cabal }}" = "2.2" ] && printf 'new' || printf 'v2')
cabal $v2-update
cabal $v2-build --dependencies-only --enable-optimization=1 --enable-benchmarks --disable-tests
- name: Build and test
run: |
v2=$([ "${{ matrix.versions.cabal }}" = "2.2" ] && printf 'new' || printf 'v2')
cabal $v2-build --enable-optimization=1 --enable-benchmarks --disable-tests 2>&1 | tee build.log
# fail if warnings in local build
! grep -q ": *[Ww]arning:" build.log || exit 1
cabal $v2-bench --enable-optimization=1 --benchmark-options='--timeout=6 +RTS -T -RTS'
198 changes: 75 additions & 123 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,29 @@ on:
- '*'
- '!rc/*'
paths-ignore:
- 'doc/**'
- 'doc/*.md'
- 'MANUAL.txt'
- '*.md'
- 'RELEASE_CHECKLIST'
- 'BUGS'
- 'changelog'
- 'README.template'
- 'appveyor.yml'
- 'hie.yaml'
- '*.nix'
- 'tools/**'
- 'linux/**'
- 'macos/**'
- 'windows/**'
- 'man/**'
pull_request:
paths-ignore:
- 'doc/**'
- 'doc/*.md'
- 'MANUAL.txt'
- '*.md'
- 'RELEASE_CHECKLIST'
- 'BUGS'
- 'changelog'
- 'README.template'
- 'appveyor.yml'
- 'hie.yaml'
- '*.nix'
- 'tools/**'
- 'linux/**'
- 'macos/**'
Expand All @@ -52,7 +52,7 @@ jobs:
testopts: '--test-option=--hide-successes --test-option=--ansi-tricks=false'
- ghc: '8.8.4'
cabal: '3.2'
cabalopts: ''
cabalopts: '-f-lua -f-server --enable-benchmarks'
testopts: '--test-option=--hide-successes --test-option=--ansi-tricks=false'
- ghc: '8.10.7'
cabal: '3.2'
Expand All @@ -66,6 +66,15 @@ jobs:
cabal: '3.6'
cabalopts: ''
testopts: '--test-option=--hide-successes --test-option=--ansi-tricks=false'
- ghc: '9.4.2'
cabal: '3.8'
cabalopts: ''
testopts: '--test-option=--hide-successes --test-option=--ansi-tricks=false'

- ghc: '9.4.2'
cabal: '3.8'
cabalopts: '--allow-newer --constrain "mtl >= 2.3.1"'
testopts: '--test-option=--hide-successes --test-option=--ansi-tricks=false'
steps:
- uses: actions/checkout@v3

Expand All @@ -79,36 +88,34 @@ jobs:
ghcup install cabal --set ${{ matrix.versions.cabal }}
# declare/restore cached things
# caching doesn't work for scheduled runs yet
# https://github.com/actions/cache/issues/63

- name: Cache cabal global package db
id: cabal-global
uses: actions/cache@v3
with:
path: |
~/.cabal
key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-global-${{ hashFiles('cabal.project') }}
key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-global-${{ secrets.CACHE_VERSION }}

- name: Cache cabal work
id: cabal-local
uses: actions/cache@v3
with:
path: |
dist-newstyle
key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-local
key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-local-${{ secrets.CACHE_VERSION }}

- name: Install dependencies
run: |
cabal update
cabal build ${{ matrix.versions.cabalopts }} --dependencies-only --enable-tests --disable-optimization
cabal build all ${{ matrix.versions.cabalopts }} --dependencies-only --enable-tests --disable-optimization
- name: Build and test
run: |
cabal build ${{ matrix.versions.cabalopts }} --enable-tests --disable-optimization 2>&1 | tee build.log
# fail if warnings in local build
! grep -q ": *[Ww]arning:" build.log || exit 1
cabal test ${{ matrix.versions.cabalopts }} --disable-optimization ${{ matrix.versions.testopts }}
! grep -q ": *[Ww]arning:\|: *error:" build.log || exit 1
cabal test all ${{ matrix.versions.cabalopts }} --disable-optimization ${{ matrix.versions.testopts }}
windows:

Expand All @@ -118,8 +125,6 @@ jobs:
- uses: actions/checkout@v3

# declare/restore cached things
# caching doesn't work for scheduled runs yet
# https://github.com/actions/cache/issues/63

- name: Cache stack global package db
id: stack-global-package-db
Expand All @@ -130,12 +135,13 @@ jobs:
key: ${{ runner.os }}-appdata-roaming-stack-${{ hashFiles('stack.yaml') }}

# stack's local package dbs for the project and each package
# - name: Cache .stack-work
# uses: actions/cache@v1
# with:
# path: .stack-work
# key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}
# restore-keys: ${{ runner.os }}-stack-work
- name: Cache .stack-work
uses: actions/cache@v1
with:
path: |
.stack-work
key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ secrets.CACHE_VERSION }}
restore-keys: ${{ runner.os }}-stack-work-${{ secrets.CACHE_VERSION }}

- name: Install dependencies
run: |
Expand All @@ -147,104 +153,50 @@ jobs:
run: |
stack test --fast --test-arguments="--hide-successes --ansi-tricks=false"
macos:

runs-on: macos-11
strategy:
fail-fast: true
matrix:
versions:
- ghc: '8.8.4'
cabal: '3.2'

steps:
- uses: actions/checkout@v3

- name: Install cabal/ghc
run: |
ghcup install ghc --set ${{ matrix.versions.ghc }}
ghcup install cabal ${{ matrix.versions.cabal }}
# declare/restore cached things
# caching doesn't work for scheduled runs yet
# https://github.com/actions/cache/issues/63

- name: Cache cabal global package db
id: cabal-global
uses: actions/cache@v3
with:
path: |
~/.cabal
key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-global-${{ hashFiles('cabal.project') }}

- name: Cache cabal work
id: cabal-local
uses: actions/cache@v3
with:
path: |
dist-newstyle
key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-local

- name: Install dependencies
run: |
cabal v2-update
cabal v2-build --dependencies-only --enable-tests --disable-optimization
- name: Build and test
run: |
cabal v2-build --enable-tests --disable-optimization 2>&1 | tee build.log
# fail if warnings in local build
! grep -q ": *[Ww]arning:" build.log || exit 1
cabal v2-test --disable-optimization --test-option=--hide-successes --test-option=--ansi-tricks=false
benchmark:

runs-on: ubuntu-18.04
strategy:
fail-fast: true
matrix:
versions:
- ghc: '8.10.7'
cabal: '3.2'
- ghc: '9.2.2'
cabal: '3.6'
steps:
- uses: actions/checkout@v3

- name: Install cabal/ghc
run: |
ghcup install ghc --set ${{ matrix.versions.ghc }}
ghcup install cabal ${{ matrix.versions.cabal }}
# declare/restore cached things
# caching doesn't work for scheduled runs yet
# https://github.com/actions/cache/issues/63

- name: Cache cabal global package db
id: cabal-global
uses: actions/cache@v3
with:
path: |
~/.cabal
key: benchmark-${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-global-${{ hashFiles('cabal.project') }}

- name: Cache cabal work
id: cabal-local
uses: actions/cache@v3
with:
path: |
dist-newstyle
key: benchmark-${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-local

- name: Install dependencies
run: |
v2=$([ "${{ matrix.versions.cabal }}" = "2.2" ] && printf 'new' || printf 'v2')
cabal $v2-update
cabal $v2-build --dependencies-only --enable-optimization=1 --enable-benchmarks --disable-tests
- name: Build and test
run: |
v2=$([ "${{ matrix.versions.cabal }}" = "2.2" ] && printf 'new' || printf 'v2')
cabal $v2-build --enable-optimization=1 --enable-benchmarks --disable-tests 2>&1 | tee build.log
# fail if warnings in local build
! grep -q ": *[Ww]arning:" build.log || exit 1
cabal $v2-bench --enable-optimization=1 --benchmark-options='--timeout=6 +RTS -T -RTS'
# We no longer run the macos tests, to make CI faster.
# macos:

# runs-on: macos-11
# strategy:
# fail-fast: true
# matrix:
# versions:
# - ghc: '8.8.4'
# cabal: '3.2'

# steps:
# - uses: actions/checkout@v3

# - name: Install cabal/ghc
# run: |
# ghcup install ghc --set ${{ matrix.versions.ghc }}
# ghcup install cabal ${{ matrix.versions.cabal }}

# # declare/restore cached things

# - name: Cache cabal global package db
# id: cabal-global
# uses: actions/cache@v3
# with:
# path: |
# ~/.cabal
# key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-global-${{ secrets.CACHE_VERSION }}

# - name: Cache cabal work
# id: cabal-local
# uses: actions/cache@v3
# with:
# path: |
# dist-newstyle
# key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-local-${{ secrets.CACHE_VERSION }}

# - name: Install dependencies
# run: |
# cabal v2-update
# cabal v2-build --dependencies-only --enable-tests --disable-optimization
# - name: Build and test
# run: |
# cabal v2-build --enable-tests --disable-optimization 2>&1 | tee build.log
# # fail if warnings in local build
# ! grep -q ": *[Ww]arning:" build.log || exit 1
# cabal v2-test --disable-optimization --test-option=--hide-successes --test-option=--ansi-tricks=false
Loading

0 comments on commit f0f1c6f

Please sign in to comment.