File tree Expand file tree Collapse file tree 1 file changed +68
-0
lines changed Expand file tree Collapse file tree 1 file changed +68
-0
lines changed Original file line number Diff line number Diff line change 1+ name : build
2+
3+ on :
4+ merge_group :
5+ pull_request :
6+ push :
7+ branches :
8+ - master
9+ workflow_dispatch :
10+
11+ jobs :
12+ build :
13+ name : build
14+ runs-on : ubuntu-latest
15+ permissions :
16+ pages : write
17+ id-token : write
18+ steps :
19+
20+ - name : setup-alex-happy
21+ run : |
22+ pushd "$(mktemp -d)"
23+ cabal path --installdir >> "$GITHUB_PATH"
24+ cabal update
25+ cabal install \
26+ alex-3.5.1.0 \
27+ happy-2.1.3
28+ popd
29+
30+ - name : setup-ghc-wasm
31+ run : |
32+ pushd "$(mktemp -d)"
33+ curl -f -L --retry 5 https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/archive/master/ghc-wasm-meta-master.tar.gz | tar xz --strip-components=1
34+ FLAVOUR=9.12 ./setup.sh
35+ ~/.ghc-wasm/add_to_github_path.sh
36+ popd
37+
38+ - name : checkout
39+ uses : actions/checkout@v4
40+ with :
41+ repository : TerrorJack/pandoc
42+ ref : wasm
43+ path : pandoc
44+
45+ - name : build
46+ run : |
47+ pushd pandoc
48+ wasm32-wasi-cabal build pandoc-cli
49+ popd
50+
51+ - name : wasm-opt
52+ run : |
53+ mkdir dist
54+ wasm-opt --low-memory-unused --converge --gufa --flatten --rereloop -Oz $(find pandoc -type f -name pandoc.wasm) -o dist/pandoc.wasm
55+
56+ - name : test
57+ run : |
58+ $CROSS_EMULATOR dist/pandoc.wasm pandoc/README.md -o pandoc/README.rst
59+ head --lines=20 pandoc/README.rst
60+
61+ - name : upload-pages-artifact
62+ uses : actions/upload-pages-artifact@v3
63+ with :
64+ path : dist
65+ retention-days : 90
66+
67+ - name : deploy-pages
68+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments