From beb7599d3353647dcc78ae0b903667d379d93449 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 13:15:35 +0100 Subject: [PATCH 01/82] Add first attempt at GitHub action file for building .pkg --- .github/workflows/build-macos-package.yml | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/build-macos-package.yml diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml new file mode 100644 index 000000000..3fb6fc5c4 --- /dev/null +++ b/.github/workflows/build-macos-package.yml @@ -0,0 +1,40 @@ +name: Build macOS Package + +on: [push, pull_request] + +jobs: + build: + name: Build on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: [macos-latest] + # env: + # LC_ALL: C.UTF-8 + + steps: + - uses: actions/checkout@v1 + + - name: Install build tools + run: | + sudo apt update + sudo apt install -y \ + haskell-platform + + - name: Checkout RGL + run: | + git clone --depth 1 https://github.com/GrammaticalFramework/gf-rgl.git ../gf-rgl + + - name: Build macOS package + run: | + make pkg + + - name: Copy packages + run: | + mkdir macos/dist + cp ../gf_*.pkg macos/dist/ + + - uses: actions/upload-artifact@v2 + with: + path: macos/dist From 86729b3efc1fca8250c0aa786194386dd2213ec4 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 13:18:57 +0100 Subject: [PATCH 02/82] Try to install GHC/Cabal via Homebrew --- .github/workflows/build-macos-package.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 3fb6fc5c4..a95f01964 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -18,9 +18,9 @@ jobs: - name: Install build tools run: | - sudo apt update - sudo apt install -y \ - haskell-platform + brew install \ + ghc \ + cabal-install - name: Checkout RGL run: | From 3844277a66925536e4285e4e533e63e43e33a70d Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 13:35:03 +0100 Subject: [PATCH 03/82] Install Haskell via setup-haskell action, install build tools for C runtime --- .github/workflows/build-macos-package.yml | 30 ++++++++++++++++++----- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index a95f01964..873ae9da6 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -7,20 +7,38 @@ jobs: name: Build on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: - fail-fast: true matrix: - os: [macos-latest] - # env: - # LC_ALL: C.UTF-8 + os: [macOS-latest] + cabal: ["3.2"] + ghc: ["8.6.5"] steps: - uses: actions/checkout@v1 + - uses: actions/setup-haskell@v1.1.1 + id: setup-haskell-cabal + name: Setup Haskell + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} + + - name: Freeze + run: | + cabal freeze + + - uses: actions/cache@v1 + name: Cache ~/.cabal/store + with: + path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} + key: ${{ runner.os }}-${{ matrix.ghc }} + # key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} + - name: Install build tools run: | brew install \ - ghc \ - cabal-install + automake \ + autoconf \ + libtool - name: Checkout RGL run: | From 6836360e0cdb6f35900e222b12a02009a4948aca Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 13:55:26 +0100 Subject: [PATCH 04/82] Comment cabal freeze and caching in case it was causing build error below https://github.com/GrammaticalFramework/gf-core/runs/1374091798?check_suite_focus=true --- .github/workflows/build-macos-package.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 873ae9da6..86425b41a 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -22,16 +22,16 @@ jobs: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} - - name: Freeze - run: | - cabal freeze - - - uses: actions/cache@v1 - name: Cache ~/.cabal/store - with: - path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} - key: ${{ runner.os }}-${{ matrix.ghc }} - # key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} + # - name: Freeze + # run: | + # cabal freeze + # + # - uses: actions/cache@v1 + # name: Cache ~/.cabal/store + # with: + # path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} + # key: ${{ runner.os }}-${{ matrix.ghc }} + # # key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} - name: Install build tools run: | From 399974ebfb606d0ff7db03c248b605b8a94fb9f4 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 13:55:53 +0100 Subject: [PATCH 05/82] Fix whitespace in binary build script --- bin/build-binary-dist.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/bin/build-binary-dist.sh b/bin/build-binary-dist.sh index 7f6ca5d72..8714c8dda 100755 --- a/bin/build-binary-dist.sh +++ b/bin/build-binary-dist.sh @@ -38,11 +38,11 @@ if which >/dev/null python; then EXTRA_INCLUDE_DIRS="$extrainclude" EXTRA_LIB_DIRS="$extralib" python setup.py build python setup.py install --prefix="$destdir$prefix" if [ "$fmt" == pkg ] ; then - # A hack for Python on OS X to find the PGF modules - pyver=$(ls "$destdir$prefix/lib" | sed -n 's/^python//p') - pydest="$destdir/Library/Python/$pyver/site-packages" - mkdir -p "$pydest" - ln "$destdir$prefix/lib/python$pyver/site-packages"/pgf* "$pydest" + # A hack for Python on OS X to find the PGF modules + pyver=$(ls "$destdir$prefix/lib" | sed -n 's/^python//p') + pydest="$destdir/Library/Python/$pyver/site-packages" + mkdir -p "$pydest" + ln "$destdir$prefix/lib/python$pyver/site-packages"/pgf* "$pydest" fi popd else @@ -55,9 +55,9 @@ if which >/dev/null javac && which >/dev/null jar ; then rm -f libjpgf.la # In case it contains the wrong INSTALL_PATH if make CFLAGS="-I$extrainclude -L$extralib" INSTALL_PATH="$prefix" then - make INSTALL_PATH="$destdir$prefix" install + make INSTALL_PATH="$destdir$prefix" install else - echo "*** Skipping the Java binding because of errors" + echo "*** Skipping the Java binding because of errors" fi popd else @@ -95,14 +95,14 @@ cabal register --gen-pkg-config=$libdir/gf-$ver.conf ## Create the binary distribution package case $fmt in tar.gz) - targz="$name-bin-$hw-$os.tar.gz" # the final tar file - tar -C "$destdir/$prefix" -zcf "dist/$targz" . - echo "Created $targz, consider renaming it to something more user friendly" - ;; + targz="$name-bin-$hw-$os.tar.gz" # the final tar file + tar -C "$destdir/$prefix" -zcf "dist/$targz" . + echo "Created $targz, consider renaming it to something more user friendly" + ;; pkg) - pkg=$name.pkg - pkgbuild --identifier org.grammaticalframework.gf.pkg --version "$ver" --root "$destdir" --install-location / dist/$pkg - echo "Created $pkg" + pkg=$name.pkg + pkgbuild --identifier org.grammaticalframework.gf.pkg --version "$ver" --root "$destdir" --install-location / dist/$pkg + echo "Created $pkg" esac rm -r "$destdir" From 24619bc3ee7efbd9dfd6edccb86bb1d8cfd3fcca Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 17:15:13 +0100 Subject: [PATCH 06/82] Change cabal version to 2.4, to match GHC 8.6.5 --- .github/workflows/build-macos-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 86425b41a..4d288e8f3 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -9,11 +9,11 @@ jobs: strategy: matrix: os: [macOS-latest] - cabal: ["3.2"] + cabal: ["2.4"] ghc: ["8.6.5"] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - uses: actions/setup-haskell@v1.1.1 id: setup-haskell-cabal From 13ec9ca888359c2430c73ee6710b1855dd9d74bb Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 17:43:15 +0100 Subject: [PATCH 07/82] Explicitly specify env vars when building GF (test) --- .github/workflows/build-macos-package.yml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 4d288e8f3..0dfda017e 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -22,23 +22,10 @@ jobs: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} - # - name: Freeze - # run: | - # cabal freeze - # - # - uses: actions/cache@v1 - # name: Cache ~/.cabal/store - # with: - # path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} - # key: ${{ runner.os }}-${{ matrix.ghc }} - # # key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} - - name: Install build tools run: | brew install \ - automake \ - autoconf \ - libtool + automake - name: Checkout RGL run: | @@ -47,6 +34,9 @@ jobs: - name: Build macOS package run: | make pkg + env: + DYLD_LIBRARY_PATH: /Users/runner/work/gf-core/gf-core/dist/gf-3.10.4-git/usr/local/lib + LD_LIBRARY_PATH: /Users/runner/work/gf-core/gf-core/dist/gf-3.10.4-git/usr/local/lib - name: Copy packages run: | From 6e2f34f4d0abee3b6526f47938a4705d1a0af270 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 17:52:41 +0100 Subject: [PATCH 08/82] Try to set PREFIX env var --- .github/workflows/build-macos-package.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 0dfda017e..0031c8a6c 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -35,8 +35,7 @@ jobs: run: | make pkg env: - DYLD_LIBRARY_PATH: /Users/runner/work/gf-core/gf-core/dist/gf-3.10.4-git/usr/local/lib - LD_LIBRARY_PATH: /Users/runner/work/gf-core/gf-core/dist/gf-3.10.4-git/usr/local/lib + PREFIX: /Users/runner/work/gf-core/gf-core/dist/gf-3.10.4-git/ - name: Copy packages run: | From f6eb94c33b8ad2f1b9a7d8cc43147cec222d54a5 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 21:12:23 +0100 Subject: [PATCH 09/82] Try removing something that looks like a typo --- .github/workflows/build-macos-package.yml | 2 -- bin/build-binary-dist.sh | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 0031c8a6c..6d11b8a1c 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -34,8 +34,6 @@ jobs: - name: Build macOS package run: | make pkg - env: - PREFIX: /Users/runner/work/gf-core/gf-core/dist/gf-3.10.4-git/ - name: Copy packages run: | diff --git a/bin/build-binary-dist.sh b/bin/build-binary-dist.sh index 8714c8dda..80b4f0d17 100755 --- a/bin/build-binary-dist.sh +++ b/bin/build-binary-dist.sh @@ -29,7 +29,7 @@ set -x # print commands before executing them pushd src/runtime/c bash setup.sh configure --prefix="$prefix" bash setup.sh build -bash setup.sh install prefix="$destdir$prefix" +bash setup.sh install prefix="$prefix" popd ## Build the python binding to the C run-time system @@ -72,7 +72,7 @@ export DYLD_LIBRARY_PATH="$extralib" LD_LIBRARY_PATH="$extralib" cabal install -w "$ghc" --only-dependencies -fserver -fc-runtime $extra cabal configure -w "$ghc" --prefix="$prefix" -fserver -fc-runtime $extra cabal build - # Building the example grammars will fail, because the RGL is missing +# Building the example grammars will fail, because the RGL is missing cabal copy --destdir="$destdir" # create www directory ## Build the RGL and copy it to $destdir From ed97a42fde223a7613bf6f9fc6ad56c70180c353 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 21:23:52 +0100 Subject: [PATCH 10/82] Try it another way round --- bin/build-binary-dist.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/build-binary-dist.sh b/bin/build-binary-dist.sh index 80b4f0d17..2c71cb2ea 100755 --- a/bin/build-binary-dist.sh +++ b/bin/build-binary-dist.sh @@ -29,7 +29,7 @@ set -x # print commands before executing them pushd src/runtime/c bash setup.sh configure --prefix="$prefix" bash setup.sh build -bash setup.sh install prefix="$prefix" +bash setup.sh install prefix="$destdir$prefix" popd ## Build the python binding to the C run-time system @@ -70,7 +70,7 @@ export DYLD_LIBRARY_PATH="$extralib" LD_LIBRARY_PATH="$extralib" ## Build GF, with C run-time support enabled cabal install -w "$ghc" --only-dependencies -fserver -fc-runtime $extra -cabal configure -w "$ghc" --prefix="$prefix" -fserver -fc-runtime $extra +cabal configure -w "$ghc" --prefix="$destdir$prefix" -fserver -fc-runtime $extra cabal build # Building the example grammars will fail, because the RGL is missing cabal copy --destdir="$destdir" # create www directory From 9018eabb10233f44b9c3381772cb1f940eaee1c0 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 21:35:17 +0100 Subject: [PATCH 11/82] Add libtool finish command from warning --- bin/build-binary-dist.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/build-binary-dist.sh b/bin/build-binary-dist.sh index 2c71cb2ea..f96831910 100755 --- a/bin/build-binary-dist.sh +++ b/bin/build-binary-dist.sh @@ -30,6 +30,7 @@ pushd src/runtime/c bash setup.sh configure --prefix="$prefix" bash setup.sh build bash setup.sh install prefix="$destdir$prefix" +libtool --finish "$prefix/lib" popd ## Build the python binding to the C run-time system From b1b3bc3360c9b10ad6767ba13063f86757ab3162 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 21:40:55 +0100 Subject: [PATCH 12/82] Install C runtime in two places. Use cabal v1-copy. --- bin/build-binary-dist.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/build-binary-dist.sh b/bin/build-binary-dist.sh index f96831910..02751f40b 100755 --- a/bin/build-binary-dist.sh +++ b/bin/build-binary-dist.sh @@ -29,8 +29,8 @@ set -x # print commands before executing them pushd src/runtime/c bash setup.sh configure --prefix="$prefix" bash setup.sh build +bash setup.sh install prefix="$prefix" bash setup.sh install prefix="$destdir$prefix" -libtool --finish "$prefix/lib" popd ## Build the python binding to the C run-time system @@ -71,10 +71,10 @@ export DYLD_LIBRARY_PATH="$extralib" LD_LIBRARY_PATH="$extralib" ## Build GF, with C run-time support enabled cabal install -w "$ghc" --only-dependencies -fserver -fc-runtime $extra -cabal configure -w "$ghc" --prefix="$destdir$prefix" -fserver -fc-runtime $extra +cabal configure -w "$ghc" --prefix="$prefix" -fserver -fc-runtime $extra cabal build # Building the example grammars will fail, because the RGL is missing -cabal copy --destdir="$destdir" # create www directory +cabal v1-copy --destdir="$destdir" # create www directory ## Build the RGL and copy it to $destdir PATH=$PWD/dist/build/gf:$PATH @@ -89,7 +89,7 @@ popd cabal build ## Copy GF to $destdir -cabal copy --destdir="$destdir" +cabal v1-copy --destdir="$destdir" libdir=$(dirname $(find "$destdir" -name PGF.hi)) cabal register --gen-pkg-config=$libdir/gf-$ver.conf From 359f1509fa70fc572351f425451360b2ec5336bb Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 21:59:05 +0100 Subject: [PATCH 13/82] Blurt out cabal version in both action and build script --- .github/workflows/build-macos-package.yml | 6 +++++- bin/build-binary-dist.sh | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 6d11b8a1c..f4f0e4edb 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -9,8 +9,8 @@ jobs: strategy: matrix: os: [macOS-latest] - cabal: ["2.4"] ghc: ["8.6.5"] + cabal: ["2.4"] steps: - uses: actions/checkout@v2 @@ -22,6 +22,10 @@ jobs: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} + - name: Check cabal version + run: | + cabal --version + - name: Install build tools run: | brew install \ diff --git a/bin/build-binary-dist.sh b/bin/build-binary-dist.sh index 02751f40b..2c03a81a1 100755 --- a/bin/build-binary-dist.sh +++ b/bin/build-binary-dist.sh @@ -25,6 +25,8 @@ extra="--extra-lib-dirs=$extralib --extra-include-dirs=$extrainclude" set -e # Stop if an error occurs set -x # print commands before executing them +cabal --version + ## First configure & build the C run-time system pushd src/runtime/c bash setup.sh configure --prefix="$prefix" @@ -74,7 +76,7 @@ cabal install -w "$ghc" --only-dependencies -fserver -fc-runtime $extra cabal configure -w "$ghc" --prefix="$prefix" -fserver -fc-runtime $extra cabal build # Building the example grammars will fail, because the RGL is missing -cabal v1-copy --destdir="$destdir" # create www directory +cabal copy --destdir="$destdir" # create www directory ## Build the RGL and copy it to $destdir PATH=$PWD/dist/build/gf:$PATH @@ -89,7 +91,7 @@ popd cabal build ## Copy GF to $destdir -cabal v1-copy --destdir="$destdir" +cabal copy --destdir="$destdir" libdir=$(dirname $(find "$destdir" -name PGF.hi)) cabal register --gen-pkg-config=$libdir/gf-$ver.conf From 687f56178ee2bee069b27fe05e031259fa1c9d2c Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 22:05:50 +0100 Subject: [PATCH 14/82] Use newer version of setup-haskell --- .github/workflows/build-macos-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index f4f0e4edb..09636db84 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-haskell@v1.1.1 + - uses: actions/setup-haskell@v1.1 id: setup-haskell-cabal name: Setup Haskell with: From 71b10672e8413be392e579261e205672725831b3 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 22:09:57 +0100 Subject: [PATCH 15/82] Fix macOS version at 10.13 --- .github/workflows/build-macos-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 09636db84..311819de5 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -8,7 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macOS-latest] + os: [macOS-10.13] ghc: ["8.6.5"] cabal: ["2.4"] From 1c7c52da68e560fc28398b324a1d1a207af12ec2 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 22:11:29 +0100 Subject: [PATCH 16/82] Use GHC 8.4.4 --- .github/workflows/build-macos-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 311819de5..9163c0137 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -8,8 +8,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macOS-10.13] - ghc: ["8.6.5"] + os: [macOS-latest] + ghc: ["8.4.4"] cabal: ["2.4"] steps: From feed61dd30bf1ed8ae2c4edc68640f1fe8c28755 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 9 Nov 2020 22:43:06 +0100 Subject: [PATCH 17/82] Change setup-haskell version to just v1 --- .github/workflows/build-macos-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 9163c0137..4331d111a 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -9,13 +9,13 @@ jobs: strategy: matrix: os: [macOS-latest] - ghc: ["8.4.4"] + ghc: ["8.6.5"] cabal: ["2.4"] steps: - uses: actions/checkout@v2 - - uses: actions/setup-haskell@v1.1 + - uses: actions/setup-haskell@v1 id: setup-haskell-cabal name: Setup Haskell with: From 2dc11524fc9d027307982ae4821c0625074c3c4e Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 16 Nov 2020 22:42:13 +0100 Subject: [PATCH 18/82] Remove RGL from build, use 'cabal v1-' commands --- .github/workflows/build-macos-package.yml | 2 +- bin/build-binary-dist.sh | 56 +++++++++-------------- 2 files changed, 23 insertions(+), 35 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 4331d111a..7ea62f5f2 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -1,6 +1,6 @@ name: Build macOS Package -on: [push, pull_request] +on: workflow_dispatch jobs: build: diff --git a/bin/build-binary-dist.sh b/bin/build-binary-dist.sh index 2c03a81a1..8c08c122b 100755 --- a/bin/build-binary-dist.sh +++ b/bin/build-binary-dist.sh @@ -1,15 +1,18 @@ #! /bin/bash -### This script builds a binary distribution of GF from the source -### package that this script is a part of. It assumes that you have installed -### a recent version of the Haskell Platform. -### Two binary package formats are supported: plain tar files (.tar.gz) and -### OS X Installer packages (.pkg). +### This script builds a binary distribution of GF from source. +### It assumes that you have Haskell and Cabal installed. +### Two binary package formats are supported (specified with the FMT env var): +### - plain tar files (.tar.gz) +### - OS X installer packages (.pkg) os=$(uname) # Operating system name (e.g. Darwin or Linux) hw=$(uname -m) # Hardware name (e.g. i686 or x86_64) -# GF version number: +cabal="cabal v1-" # Cabal >= 2.4 +# cabal="cabal " # Cabal <= 2.2 + +## Get GF version number from Cabal file ver=$(grep -i ^version: gf.cabal | sed -e 's/version://' -e 's/ //g') name="gf-$ver" @@ -25,14 +28,13 @@ extra="--extra-lib-dirs=$extralib --extra-include-dirs=$extrainclude" set -e # Stop if an error occurs set -x # print commands before executing them -cabal --version - ## First configure & build the C run-time system pushd src/runtime/c bash setup.sh configure --prefix="$prefix" bash setup.sh build -bash setup.sh install prefix="$prefix" -bash setup.sh install prefix="$destdir$prefix" +## Install in two places: +# bash setup.sh install prefix="$prefix" # for GF build to find +bash setup.sh install prefix="$destdir$prefix" # for inclusion in distribution popd ## Build the python binding to the C run-time system @@ -60,47 +62,32 @@ if which >/dev/null javac && which >/dev/null jar ; then then make INSTALL_PATH="$destdir$prefix" install else - echo "*** Skipping the Java binding because of errors" + echo "Skipping the Java binding because of errors" fi popd else echo "Java SDK is not installed, so the Java binding will not be included" fi -## To find dynamic C run-time libraries when running GF below +## To find dynamic C run-time libraries when building GF below export DYLD_LIBRARY_PATH="$extralib" LD_LIBRARY_PATH="$extralib" - ## Build GF, with C run-time support enabled -cabal install -w "$ghc" --only-dependencies -fserver -fc-runtime $extra -cabal configure -w "$ghc" --prefix="$prefix" -fserver -fc-runtime $extra -cabal build -# Building the example grammars will fail, because the RGL is missing -cabal copy --destdir="$destdir" # create www directory - -## Build the RGL and copy it to $destdir -PATH=$PWD/dist/build/gf:$PATH -export GF_LIB_PATH="$(dirname $(find "$destdir" -name www))/lib" # hmm -mkdir -p "$GF_LIB_PATH" -pushd ../gf-rgl -make build -make copy -popd - -# Build GF again, including example grammars that need the RGL -cabal build +${cabal}install -w "$ghc" --only-dependencies -fserver -fc-runtime $extra +${cabal}configure -w "$ghc" --prefix="$prefix" -fserver -fc-runtime $extra +${cabal}build ## Copy GF to $destdir -cabal copy --destdir="$destdir" +${cabal}copy --destdir="$destdir" libdir=$(dirname $(find "$destdir" -name PGF.hi)) -cabal register --gen-pkg-config=$libdir/gf-$ver.conf +${cabal}register --gen-pkg-config="$libdir/gf-$ver.conf" ## Create the binary distribution package case $fmt in tar.gz) targz="$name-bin-$hw-$os.tar.gz" # the final tar file - tar -C "$destdir/$prefix" -zcf "dist/$targz" . - echo "Created $targz, consider renaming it to something more user friendly" + tar --directory "$destdir/$prefix" --gzip --create --file "dist/$targz" . + echo "Created $targz" ;; pkg) pkg=$name.pkg @@ -108,4 +95,5 @@ case $fmt in echo "Created $pkg" esac +## Cleanup rm -r "$destdir" From b4ccca8c1800498c789ab405c5233f628779965a Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 16 Nov 2020 22:46:04 +0100 Subject: [PATCH 19/82] Build on push too --- .github/workflows/build-macos-package.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 7ea62f5f2..091beb150 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -1,6 +1,8 @@ name: Build macOS Package -on: workflow_dispatch +on: + push: + workflow_dispatch: jobs: build: From ce9caa27267da33c302404f04d718e6dc34c53f5 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 16 Nov 2020 22:54:19 +0100 Subject: [PATCH 20/82] Install alex and happy --- .github/workflows/build-macos-package.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 091beb150..d55c134a9 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -17,9 +17,9 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: actions/setup-haskell@v1 + - name: Setup Haskell + uses: actions/setup-haskell@v1 id: setup-haskell-cabal - name: Setup Haskell with: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} @@ -32,10 +32,7 @@ jobs: run: | brew install \ automake - - - name: Checkout RGL - run: | - git clone --depth 1 https://github.com/GrammaticalFramework/gf-rgl.git ../gf-rgl + cabal v1-install alex happy - name: Build macOS package run: | @@ -46,6 +43,7 @@ jobs: mkdir macos/dist cp ../gf_*.pkg macos/dist/ - - uses: actions/upload-artifact@v2 + - name: Upload artifact + uses: actions/upload-artifact@v2 with: path: macos/dist From 30bcafb76f693fb9208312c62c557ff88e1a27db Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 16 Nov 2020 23:18:40 +0100 Subject: [PATCH 21/82] Re-enable hack for finding C runtime on macOS --- bin/build-binary-dist.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/build-binary-dist.sh b/bin/build-binary-dist.sh index 8c08c122b..5258ec702 100755 --- a/bin/build-binary-dist.sh +++ b/bin/build-binary-dist.sh @@ -32,9 +32,8 @@ set -x # print commands before executing them pushd src/runtime/c bash setup.sh configure --prefix="$prefix" bash setup.sh build -## Install in two places: -# bash setup.sh install prefix="$prefix" # for GF build to find -bash setup.sh install prefix="$destdir$prefix" # for inclusion in distribution +bash setup.sh install prefix="$prefix" # hack required for GF build on macOS +bash setup.sh install prefix="$destdir$prefix" popd ## Build the python binding to the C run-time system From a7ff2d06117fcb45331f67e8ce52a913b96ed76b Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 16 Nov 2020 23:41:01 +0100 Subject: [PATCH 22/82] Upload artifact directly without copying elsewhere in between --- .github/workflows/build-macos-package.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index d55c134a9..24cf6c1e3 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -24,10 +24,6 @@ jobs: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} - - name: Check cabal version - run: | - cabal --version - - name: Install build tools run: | brew install \ @@ -38,12 +34,9 @@ jobs: run: | make pkg - - name: Copy packages - run: | - mkdir macos/dist - cp ../gf_*.pkg macos/dist/ - - name: Upload artifact uses: actions/upload-artifact@v2 with: - path: macos/dist + name: macOS package + path: dist/gf_*.pkg + if-no-files-found: error From 5a6acf1d47a7c4b4ba5c20aa5ca9f7484592e404 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 16 Nov 2020 23:50:02 +0100 Subject: [PATCH 23/82] Replace _ with - --- .github/workflows/build-macos-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 24cf6c1e3..c01227791 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -38,5 +38,5 @@ jobs: uses: actions/upload-artifact@v2 with: name: macOS package - path: dist/gf_*.pkg + path: dist/gf-*.pkg if-no-files-found: error From 8550f8deaf6d7095963bfd6998a512ac87a43cd5 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 17 Nov 2020 00:01:05 +0100 Subject: [PATCH 24/82] Remove RGL and HTML from Debian build --- .github/workflows/build-debian-package.yml | 27 ++++++++-------------- .gitignore | 6 +++++ debian/rules | 10 +++----- 3 files changed, 19 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-debian-package.yml b/.github/workflows/build-debian-package.yml index 09719aaa8..bd607fb59 100644 --- a/.github/workflows/build-debian-package.yml +++ b/.github/workflows/build-debian-package.yml @@ -1,20 +1,21 @@ name: Build Debian Package -on: [push, pull_request] +on: + push: + workflow_dispatch: jobs: build: name: Build on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: - fail-fast: true matrix: os: [ubuntu-18.04] env: LC_ALL: C.UTF-8 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Install build tools run: | @@ -27,23 +28,15 @@ jobs: libghc-json-dev \ python-dev \ default-jdk \ - libtool-bin \ - txt2tags \ - pandoc - - - name: Checkout RGL - run: | - git clone --depth 1 https://github.com/GrammaticalFramework/gf-rgl.git ../gf-rgl + libtool-bin - name: Build Debian package run: | make deb - - name: Copy packages - run: | - mkdir debian/dist - cp ../gf_*.deb debian/dist/ - - - uses: actions/upload-artifact@v2 + - name: Upload artifact + uses: actions/upload-artifact@v2 with: - path: debian/dist + name: Debian package + path: ../gf_*.deb + if-no-files-found: error diff --git a/.gitignore b/.gitignore index 10968810e..01b58ccb4 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,12 @@ *.jar *.gfo *.pgf +debian/.debhelper +debian/debhelper-build-stamp +debian/gf +debian/gf.debhelper.log +debian/gf.substvars +debian/files dist/ dist-newstyle/ src/runtime/c/.libs/ diff --git a/debian/rules b/debian/rules index 917801826..8bd3c1f85 100755 --- a/debian/rules +++ b/debian/rules @@ -1,6 +1,6 @@ #!/usr/bin/make -f -%: +%: +dh $@ #dh_shlibdeps has a problem finding which package some of the Haskell @@ -26,14 +26,10 @@ override_dh_auto_build: cd src/runtime/python && EXTRA_INCLUDE_DIRS=$(CURDIR)/src/runtime/c EXTRA_LIB_DIRS=$(CURDIR)/src/runtime/c/.libs python setup.py build cd src/runtime/java && make CFLAGS="-I$(CURDIR)/src/runtime/c -L$(CURDIR)/src/runtime/c/.libs" INSTALL_PATH=/usr echo $(SET_LDL) - -$(SET_LDL) cabal build # builds gf, fails to build example grammars - export $(SET_LDL); PATH=$(CURDIR)/dist/build/gf:$$PATH && make -C ../gf-rgl build - GF_LIB_PATH=$(CURDIR)/../gf-rgl/dist $(SET_LDL) cabal build # have RGL now, ok to build example grammars - make html + -$(SET_LDL) cabal build override_dh_auto_install: - $(SET_LDL) cabal copy --destdir=$(CURDIR)/debian/gf # creates www directory - export GF_LIB_PATH="$$(dirname $$(find "$(CURDIR)/debian/gf" -name www))/lib" && echo "GF_LIB_PATH=$$GF_LIB_PATH" && mkdir -p "$$GF_LIB_PATH" && make -C ../gf-rgl copy + $(SET_LDL) cabal copy --destdir=$(CURDIR)/debian/gf cd src/runtime/c && bash setup.sh copy prefix=$(CURDIR)/debian/gf/usr cd src/runtime/python && python setup.py install --prefix=$(CURDIR)/debian/gf/usr cd src/runtime/java && make INSTALL_PATH=$(CURDIR)/debian/gf/usr install From 8cc901f334e99f2e2cfa6b78ebe3fdfebe32fbc7 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 17 Nov 2020 00:04:57 +0100 Subject: [PATCH 25/82] Remove txt2tags and pandoc from Debian requirements --- debian/control | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index a07187983..12eb6b9d9 100644 --- a/debian/control +++ b/debian/control @@ -3,14 +3,14 @@ Section: devel Priority: optional Maintainer: Thomas Hallgren Standards-Version: 3.9.2 -Build-Depends: debhelper (>= 5), haskell-platform (>= 2011.2.0.1), libghc-haskeline-dev, libghc-mtl-dev, libghc-json-dev, autoconf, automake, libtool-bin, python-dev, java-sdk, txt2tags, pandoc +Build-Depends: debhelper (>= 5), haskell-platform (>= 2011.2.0.1), libghc-haskeline-dev, libghc-mtl-dev, libghc-json-dev, autoconf, automake, libtool-bin, python-dev, java-sdk Homepage: http://www.grammaticalframework.org/ Package: gf Architecture: any Depends: ${shlibs:Depends} Description: Tools for GF, a grammar formalism based on type theory - Grammatical Framework (GF) is a grammar formalism based on type theory. + Grammatical Framework (GF) is a grammar formalism based on type theory. It consists of a special-purpose programming language, a compiler of the language, and a generic grammar processor. . From 38facbc0648e992a5c327f2ff6d173f231d0a0cf Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 17 Nov 2020 00:16:01 +0100 Subject: [PATCH 26/82] Copy package from parent dir first because upload-artifact doesn't allow .. --- .github/workflows/build-debian-package.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-debian-package.yml b/.github/workflows/build-debian-package.yml index bd607fb59..f3a937271 100644 --- a/.github/workflows/build-debian-package.yml +++ b/.github/workflows/build-debian-package.yml @@ -34,9 +34,13 @@ jobs: run: | make deb + - name: Copy package + run: | + cp ../gf_*.deb dist/ + - name: Upload artifact uses: actions/upload-artifact@v2 with: name: Debian package - path: ../gf_*.deb + path: dist/gf_*.deb if-no-files-found: error From dbb0bcc5dd7e85d5f790fa4d84a017d79e35b2ec Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 17 Nov 2020 00:44:05 +0100 Subject: [PATCH 27/82] Minors in comments --- bin/build-binary-dist.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/build-binary-dist.sh b/bin/build-binary-dist.sh index 5258ec702..4ea1c31a3 100755 --- a/bin/build-binary-dist.sh +++ b/bin/build-binary-dist.sh @@ -4,7 +4,7 @@ ### It assumes that you have Haskell and Cabal installed. ### Two binary package formats are supported (specified with the FMT env var): ### - plain tar files (.tar.gz) -### - OS X installer packages (.pkg) +### - macOS installer packages (.pkg) os=$(uname) # Operating system name (e.g. Darwin or Linux) hw=$(uname -m) # Hardware name (e.g. i686 or x86_64) @@ -42,7 +42,7 @@ if which >/dev/null python; then EXTRA_INCLUDE_DIRS="$extrainclude" EXTRA_LIB_DIRS="$extralib" python setup.py build python setup.py install --prefix="$destdir$prefix" if [ "$fmt" == pkg ] ; then - # A hack for Python on OS X to find the PGF modules + # A hack for Python on macOS to find the PGF modules pyver=$(ls "$destdir$prefix/lib" | sed -n 's/^python//p') pydest="$destdir/Library/Python/$pyver/site-packages" mkdir -p "$pydest" From 08af1356530de0d7d8dbcf095aab99911f5113ca Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Wed, 18 Nov 2020 23:08:49 +0100 Subject: [PATCH 28/82] Install openjdk in macOS build --- .github/workflows/build-all-versions.yml | 8 ++++---- .github/workflows/build-macos-package.yml | 5 +++-- .github/workflows/build-python-package.yml | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-all-versions.yml b/.github/workflows/build-all-versions.yml index 52db74850..df71f0ac0 100644 --- a/.github/workflows/build-all-versions.yml +++ b/.github/workflows/build-all-versions.yml @@ -13,16 +13,16 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macOS-latest, windows-latest] + os: [ubuntu-latest, macos-latest, windows-latest] cabal: ["3.2"] ghc: - "8.6.5" - "8.8.3" - "8.10.1" exclude: - - os: macOS-latest + - os: macos-latest ghc: 8.8.3 - - os: macOS-latest + - os: macos-latest ghc: 8.6.5 - os: windows-latest ghc: 8.8.3 @@ -92,4 +92,4 @@ jobs: # - name: Test # run: | - # stack test --system-ghc \ No newline at end of file + # stack test --system-ghc diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index c01227791..e3ed3def2 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -10,7 +10,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macOS-latest] + os: [macos-10.15] ghc: ["8.6.5"] cabal: ["2.4"] @@ -27,7 +27,8 @@ jobs: - name: Install build tools run: | brew install \ - automake + automake \ + openjdk cabal v1-install alex happy - name: Build macOS package diff --git a/.github/workflows/build-python-package.yml b/.github/workflows/build-python-package.yml index 921da9fb5..fef31a785 100644 --- a/.github/workflows/build-python-package.yml +++ b/.github/workflows/build-python-package.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-18.04, macos-latest] + os: [ubuntu-18.04, macos-10.15] steps: - uses: actions/checkout@v1 From 6ee7c88f342a03690dabf596ae1ecdc8df7da851 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Wed, 18 Nov 2020 23:10:54 +0100 Subject: [PATCH 29/82] Add first attempt at Windows build --- .github/workflows/build-windows-package.yml | 43 +++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/build-windows-package.yml diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml new file mode 100644 index 000000000..994d377ca --- /dev/null +++ b/.github/workflows/build-windows-package.yml @@ -0,0 +1,43 @@ +name: Build Windows Package + +on: + push: + workflow_dispatch: + +jobs: + build: + name: Build on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [windows-2019] + ghc: ["8.6.5"] + cabal: ["2.4"] + + steps: + - uses: actions/checkout@v2 + + - name: Setup Haskell + uses: actions/setup-haskell@v1 + id: setup-haskell-cabal + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} + + # - name: Install build tools + # run: | + # brew install \ + # automake \ + # openjdk + # cabal v1-install alex happy + + - name: Build GF package + run: | + cabal build + + # - name: Upload artifact + # uses: actions/upload-artifact@v2 + # with: + # name: macOS package + # path: dist/gf-*.pkg + # if-no-files-found: error From 0d12c7101c78444c1c7dbce55c9a311d4ecfd406 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Wed, 18 Nov 2020 23:15:15 +0100 Subject: [PATCH 30/82] Add debugging output to macOS build for locating JNI headers --- .github/workflows/build-macos-package.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index e3ed3def2..7c4854d3d 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -17,6 +17,11 @@ jobs: steps: - uses: actions/checkout@v2 + # just to see output + - run: locate jni.h + - run: find / -name jni.h + - run: brew reinstall openjdk + - name: Setup Haskell uses: actions/setup-haskell@v1 id: setup-haskell-cabal @@ -27,8 +32,7 @@ jobs: - name: Install build tools run: | brew install \ - automake \ - openjdk + automake cabal v1-install alex happy - name: Build macOS package From 012541ff5576ead9d999b5e66821a52b3bcfdace Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Wed, 18 Nov 2020 23:17:42 +0100 Subject: [PATCH 31/82] Remove locate command, which fails because of missing DB --- .github/workflows/build-macos-package.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 7c4854d3d..209b31de2 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -18,7 +18,6 @@ jobs: - uses: actions/checkout@v2 # just to see output - - run: locate jni.h - run: find / -name jni.h - run: brew reinstall openjdk From 8e9212d059f67a73a0413ed01d2cab1524af5d1f Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Wed, 18 Nov 2020 23:19:24 +0100 Subject: [PATCH 32/82] First install dependencies in Windows build --- .github/workflows/build-windows-package.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 994d377ca..0d347aedc 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -33,6 +33,8 @@ jobs: - name: Build GF package run: | + cabal install --only-dependencies + cabal configure cabal build # - name: Upload artifact From d39e4a22a8c591938170e7f66c3c1c8ea9073e15 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Wed, 18 Nov 2020 23:24:38 +0100 Subject: [PATCH 33/82] Don't build binaries on push --- .github/workflows/build-debian-package.yml | 1 - .github/workflows/build-macos-package.yml | 1 - .github/workflows/build-python-package.yml | 6 +++++- .github/workflows/build-windows-package.yml | 1 - 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-debian-package.yml b/.github/workflows/build-debian-package.yml index f3a937271..8248388ad 100644 --- a/.github/workflows/build-debian-package.yml +++ b/.github/workflows/build-debian-package.yml @@ -1,7 +1,6 @@ name: Build Debian Package on: - push: workflow_dispatch: jobs: diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 209b31de2..384f6527d 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -1,7 +1,6 @@ name: Build macOS Package on: - push: workflow_dispatch: jobs: diff --git a/.github/workflows/build-python-package.yml b/.github/workflows/build-python-package.yml index fef31a785..6326821dc 100644 --- a/.github/workflows/build-python-package.yml +++ b/.github/workflows/build-python-package.yml @@ -1,6 +1,10 @@ name: Build & Publish Python Package -on: [push, pull_request] +# Trigger the workflow on push or pull request, but only for the master branch +on: + pull_request: + push: + branches: [master] jobs: build_wheels: diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 0d347aedc..60647f982 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -1,7 +1,6 @@ name: Build Windows Package on: - push: workflow_dispatch: jobs: From 293d05fde14b1f2cf887e900e293b48b44dc65a6 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Wed, 18 Nov 2020 23:26:31 +0100 Subject: [PATCH 34/82] Install alex, happy in Windows build --- .github/workflows/build-windows-package.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 60647f982..2b1f31123 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -23,14 +23,11 @@ jobs: ghc-version: ${{ matrix.ghc }} cabal-version: ${{ matrix.cabal }} - # - name: Install build tools - # run: | - # brew install \ - # automake \ - # openjdk - # cabal v1-install alex happy + - name: Install build tools + run: | + cabal install alex happy - - name: Build GF package + - name: Build GF run: | cabal install --only-dependencies cabal configure From b0341ec42d71eaa5ff9e527e4daff3501a2a1a62 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Wed, 18 Nov 2020 23:48:20 +0100 Subject: [PATCH 35/82] Add more test commands for JNI in macOS; re-enable mac & Windows builds on push for testing --- .github/workflows/build-macos-package.yml | 5 ++++- .github/workflows/build-windows-package.yml | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 384f6527d..12c87e451 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -1,6 +1,7 @@ name: Build macOS Package on: + push: # testing until merged into master workflow_dispatch: jobs: @@ -17,7 +18,9 @@ jobs: - uses: actions/checkout@v2 # just to see output - - run: find / -name jni.h + - run: echo $JAVA_HOME + - run: echo $JAVA_INCLUDE_DIR + - run: export JAVA_INCLUDE_DIR=/usr/local/Cellar/openjdk/15.0.1/include - run: brew reinstall openjdk - name: Setup Haskell diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 2b1f31123..7f9397177 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -1,6 +1,7 @@ name: Build Windows Package on: + push: # testing until merged into master workflow_dispatch: jobs: From 131d196fadd4b05f2b37371f1ad63dfdd5e692e6 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 19 Nov 2020 00:02:50 +0100 Subject: [PATCH 36/82] Add 'export CPPFLAGS' line to macOS build --- .github/workflows/build-macos-package.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 12c87e451..89b771427 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -17,12 +17,6 @@ jobs: steps: - uses: actions/checkout@v2 - # just to see output - - run: echo $JAVA_HOME - - run: echo $JAVA_INCLUDE_DIR - - run: export JAVA_INCLUDE_DIR=/usr/local/Cellar/openjdk/15.0.1/include - - run: brew reinstall openjdk - - name: Setup Haskell uses: actions/setup-haskell@v1 id: setup-haskell-cabal @@ -38,6 +32,7 @@ jobs: - name: Build macOS package run: | + export CPPFLAGS="-I/usr/local/opt/openjdk/include" make pkg - name: Upload artifact From a48bbb3b132d1ef1ba10ca3218e140624fba0b57 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 19 Nov 2020 00:08:07 +0100 Subject: [PATCH 37/82] Enable server, upload artifact (only exe) to Windows build --- .github/workflows/build-windows-package.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 7f9397177..9bced8a01 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -30,13 +30,13 @@ jobs: - name: Build GF run: | - cabal install --only-dependencies - cabal configure + cabal install --only-dependencies -fserver + cabal configure -fserver cabal build - # - name: Upload artifact - # uses: actions/upload-artifact@v2 - # with: - # name: macOS package - # path: dist/gf-*.pkg - # if-no-files-found: error + - name: Upload exe to artifact + uses: actions/upload-artifact@v2 + with: + name: Windows package + path: dist\build\gf\gf.exe + if-no-files-found: error From 0b3ae5aaa28232353d787eac5a86d4298c50270c Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 19 Nov 2020 00:26:53 +0100 Subject: [PATCH 38/82] Rename artifacts --- .github/workflows/build-debian-package.yml | 3 ++- .github/workflows/build-macos-package.yml | 2 +- .github/workflows/build-windows-package.yml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-debian-package.yml b/.github/workflows/build-debian-package.yml index 8248388ad..cfd48825f 100644 --- a/.github/workflows/build-debian-package.yml +++ b/.github/workflows/build-debian-package.yml @@ -1,6 +1,7 @@ name: Build Debian Package on: + push: # testing until merged into master workflow_dispatch: jobs: @@ -40,6 +41,6 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v2 with: - name: Debian package + name: gf-${{ github.sha }}-debian path: dist/gf_*.deb if-no-files-found: error diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 89b771427..5b751a9d6 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -38,6 +38,6 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v2 with: - name: macOS package + name: gf-${{ github.sha }}-macos path: dist/gf-*.pkg if-no-files-found: error diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 9bced8a01..56312717e 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -37,6 +37,6 @@ jobs: - name: Upload exe to artifact uses: actions/upload-artifact@v2 with: - name: Windows package + name: gf-${{ github.sha }}-windows path: dist\build\gf\gf.exe if-no-files-found: error From a072b4688b6045d2054d4910cccc26042544aae5 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 19 Nov 2020 00:40:51 +0100 Subject: [PATCH 39/82] Create symlink to JNI headers in a place where the Java runtime makefile looks --- .github/workflows/build-macos-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 5b751a9d6..55f60d2c8 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -32,7 +32,7 @@ jobs: - name: Build macOS package run: | - export CPPFLAGS="-I/usr/local/opt/openjdk/include" + ln -s /usr/local/opt/openjdk/include /Library/Java/Home/include make pkg - name: Upload artifact From 4987b70df7711b274f7d420aa0ff99c74ac37d02 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 19 Nov 2020 00:49:31 +0100 Subject: [PATCH 40/82] Make directory first --- .github/workflows/build-macos-package.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 55f60d2c8..9f4f0a847 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -32,6 +32,7 @@ jobs: - name: Build macOS package run: | + mkdir -p /Library/Java/Home ln -s /usr/local/opt/openjdk/include /Library/Java/Home/include make pkg From 424e6887b517bfb2638ed19391ffc025b058ed34 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 19 Nov 2020 00:58:07 +0100 Subject: [PATCH 41/82] Attempt to build C runtime in Windows build using MSYS --- .github/workflows/build-windows-package.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 56312717e..3b71a3c6e 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -17,6 +17,12 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Setup MSYS2 + uses: msys2/setup-msys2@v2 + with: + install: >- + base-devel + - name: Setup Haskell uses: actions/setup-haskell@v1 id: setup-haskell-cabal @@ -28,6 +34,19 @@ jobs: run: | cabal install alex happy + - name: Build C runtime + shell: msys2 {0} + run: | + cd src\runtime\c + autoreconf -i + ./configure + make + make install + + # - name: Build Java bindings + # + # - name: Build Python bindings + - name: Build GF run: | cabal install --only-dependencies -fserver From 12ece264092b7852f357c612c0fe616c388227b8 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 19 Nov 2020 00:58:37 +0100 Subject: [PATCH 42/82] sudo mkdir --- .github/workflows/build-macos-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index 9f4f0a847..d4ac26f77 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -32,8 +32,8 @@ jobs: - name: Build macOS package run: | - mkdir -p /Library/Java/Home - ln -s /usr/local/opt/openjdk/include /Library/Java/Home/include + sudo mkdir -p /Library/Java/Home + sudo ln -s /usr/local/opt/openjdk/include /Library/Java/Home/include make pkg - name: Upload artifact From 0a0060373b91ad1d881eaed78d678c86a3d56655 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 19 Nov 2020 01:09:07 +0100 Subject: [PATCH 43/82] Flip slashes --- .github/workflows/build-windows-package.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 3b71a3c6e..3ed666c5e 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -37,16 +37,12 @@ jobs: - name: Build C runtime shell: msys2 {0} run: | - cd src\runtime\c + cd src/runtime/c autoreconf -i ./configure make make install - # - name: Build Java bindings - # - # - name: Build Python bindings - - name: Build GF run: | cabal install --only-dependencies -fserver From 3e20e735a3fe8c57a01ea75b647f89e16422e323 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 19 Nov 2020 01:22:26 +0100 Subject: [PATCH 44/82] Install gcc in MSYS --- .github/workflows/build-windows-package.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 3ed666c5e..9358e87f7 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -22,6 +22,7 @@ jobs: with: install: >- base-devel + gcc - name: Setup Haskell uses: actions/setup-haskell@v1 From af9c8ee553c2eef90742679342e873470ee22fa1 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 19 Nov 2020 14:56:51 +0100 Subject: [PATCH 45/82] Add compiled C runtime to artifact in Windows build --- .github/workflows/build-windows-package.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 9358e87f7..1432b754b 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -44,6 +44,23 @@ jobs: make make install + - name: Upload C runtime to artifact + uses: actions/upload-artifact@v2 + with: + name: gf-${{ github.sha }}-windows + path: | + /mingw64/bin/libpgf-0.dll + /mingw64/bin/libgu-0.dll + if-no-files-found: error + + # - name: Build Java bindings + # + # - name: Upload Java bindings to artifact + # + # - name: Build Python bindings + # + # - name: Upload Python bindings to artifact + - name: Build GF run: | cabal install --only-dependencies -fserver From 4d2218a0d1aaffb3a5b13422a59718da83f67ff0 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 10:10:04 +0100 Subject: [PATCH 46/82] See what's in /mingw64/bin --- .github/workflows/build-debian-package.yml | 1 - .github/workflows/build-macos-package.yml | 1 - .github/workflows/build-windows-package.yml | 7 +++++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-debian-package.yml b/.github/workflows/build-debian-package.yml index cfd48825f..02a0b3846 100644 --- a/.github/workflows/build-debian-package.yml +++ b/.github/workflows/build-debian-package.yml @@ -1,7 +1,6 @@ name: Build Debian Package on: - push: # testing until merged into master workflow_dispatch: jobs: diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml index d4ac26f77..1ebf5dfa6 100644 --- a/.github/workflows/build-macos-package.yml +++ b/.github/workflows/build-macos-package.yml @@ -1,7 +1,6 @@ name: Build macOS Package on: - push: # testing until merged into master workflow_dispatch: jobs: diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 1432b754b..d5b9a8664 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -44,13 +44,16 @@ jobs: make make install + - shell: mysys2 {0} + run: | + ls -al /mingw64/bin + - name: Upload C runtime to artifact uses: actions/upload-artifact@v2 with: name: gf-${{ github.sha }}-windows path: | - /mingw64/bin/libpgf-0.dll - /mingw64/bin/libgu-0.dll + /mingw64/bin if-no-files-found: error # - name: Build Java bindings From ee6082d1004d5696c4989f563af4d4f8e83db492 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 10:25:04 +0100 Subject: [PATCH 47/82] Typo --- .github/workflows/build-windows-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index d5b9a8664..34bb2db50 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -44,7 +44,7 @@ jobs: make make install - - shell: mysys2 {0} + - shell: msys2 {0} run: | ls -al /mingw64/bin From 43b06d5f53f21db7022a1977fcf8068c20a127da Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 10:41:26 +0100 Subject: [PATCH 48/82] Use windows path with upload-artifact --- .github/workflows/build-windows-package.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 34bb2db50..a8d568786 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -44,16 +44,13 @@ jobs: make make install - - shell: msys2 {0} - run: | - ls -al /mingw64/bin - - name: Upload C runtime to artifact uses: actions/upload-artifact@v2 with: name: gf-${{ github.sha }}-windows path: | - /mingw64/bin + D:\mingw64\bin\libgu-0.dll + D:\mingw64\bin\libpgf-0.dll if-no-files-found: error # - name: Build Java bindings From 9a697fbde47454393c5161891f808f00d6a56c9b Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 12:10:43 +0100 Subject: [PATCH 49/82] Try different upload path --- .github/workflows/build-windows-package.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index a8d568786..af826129b 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -48,9 +48,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: gf-${{ github.sha }}-windows - path: | - D:\mingw64\bin\libgu-0.dll - D:\mingw64\bin\libpgf-0.dll + path: /mingw64/bin/* if-no-files-found: error # - name: Build Java bindings From e47ce2a28bd967ba00667b1d60c2168f77c68b57 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 12:19:25 +0100 Subject: [PATCH 50/82] Try another upload path --- .github/workflows/build-windows-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index af826129b..db48bda66 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -48,7 +48,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: gf-${{ github.sha }}-windows - path: /mingw64/bin/* + path: /d/mingw64/bin/* if-no-files-found: error # - name: Build Java bindings From cac65418ff98c180cfad282893f376f3f10dc427 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 12:28:32 +0100 Subject: [PATCH 51/82] Try yet another path --- .github/workflows/build-windows-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index db48bda66..7383ab1e4 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -48,7 +48,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: gf-${{ github.sha }}-windows - path: /d/mingw64/bin/* + path: D:\mingw64\bin\* if-no-files-found: error # - name: Build Java bindings From 59dda75f1609fff06d436647c70f0d8116fc243e Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 12:30:53 +0100 Subject: [PATCH 52/82] Find Java stuff --- .github/workflows/build-windows-package.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 7383ab1e4..5250ee082 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -24,6 +24,11 @@ jobs: base-devel gcc + - name: Find Java stuff + shell: msys2 {0} + run: | + find / -name "jni.h" + - name: Setup Haskell uses: actions/setup-haskell@v1 id: setup-haskell-cabal From c8623e2be7c653a201dc65e40b7d77f313d45de9 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 12:40:42 +0100 Subject: [PATCH 53/82] Try to find Java stuff --- .github/workflows/build-windows-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 5250ee082..b2cb0a0b5 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -27,7 +27,7 @@ jobs: - name: Find Java stuff shell: msys2 {0} run: | - find / -name "jni.h" + find /c -name "jni.h" - name: Setup Haskell uses: actions/setup-haskell@v1 From d79fa6d22b302a30db0f3df00b79bcd8f59187fe Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 12:48:46 +0100 Subject: [PATCH 54/82] Move DLLs into another folder first --- .github/workflows/build-windows-package.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index b2cb0a0b5..151fd0548 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -24,11 +24,6 @@ jobs: base-devel gcc - - name: Find Java stuff - shell: msys2 {0} - run: | - find /c -name "jni.h" - - name: Setup Haskell uses: actions/setup-haskell@v1 id: setup-haskell-cabal @@ -40,6 +35,11 @@ jobs: run: | cabal install alex happy + - name: Prepare dist folder + shell: msys2 {0} + run: | + mkdir /c/tmp-dist + - name: Build C runtime shell: msys2 {0} run: | @@ -48,12 +48,13 @@ jobs: ./configure make make install + cp /mingw64/bin/*.dll /c/tmp-dist - name: Upload C runtime to artifact uses: actions/upload-artifact@v2 with: name: gf-${{ github.sha }}-windows - path: D:\mingw64\bin\* + path: C:\tmp-dist\* if-no-files-found: error # - name: Build Java bindings From 9131581f0311931deec0f43785b1aa4d2d800049 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 12:52:21 +0100 Subject: [PATCH 55/82] Add windows-testing workflow --- .github/workflows/windows-testing.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/workflows/windows-testing.yml diff --git a/.github/workflows/windows-testing.yml b/.github/workflows/windows-testing.yml new file mode 100644 index 000000000..33393129a --- /dev/null +++ b/.github/workflows/windows-testing.yml @@ -0,0 +1,10 @@ +name: Windows testing + +on: push + +jobs: + run: + runs-on: windows-2019 + + steps: + - run: where java From e36b7cb044aab0f77cc634e4aa81da0f45e63524 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 12:57:24 +0100 Subject: [PATCH 56/82] Windows testing... --- .github/workflows/windows-testing.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows-testing.yml b/.github/workflows/windows-testing.yml index 33393129a..75fbb332a 100644 --- a/.github/workflows/windows-testing.yml +++ b/.github/workflows/windows-testing.yml @@ -7,4 +7,5 @@ jobs: runs-on: windows-2019 steps: - - run: where java + - run: | + dir C:\Program Files\Java\ From 301f23ac55937319ab463fa6bb60a6fa7642a3c8 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 12:58:21 +0100 Subject: [PATCH 57/82] Windows testing... --- .github/workflows/windows-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-testing.yml b/.github/workflows/windows-testing.yml index 75fbb332a..91446bed8 100644 --- a/.github/workflows/windows-testing.yml +++ b/.github/workflows/windows-testing.yml @@ -8,4 +8,4 @@ jobs: steps: - run: | - dir C:\Program Files\Java\ + dir "C:\Program Files\Java" From 08e6aca83d2df5572a298df264969fd3631d93d9 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 13:00:05 +0100 Subject: [PATCH 58/82] Windows testing... --- .github/workflows/windows-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-testing.yml b/.github/workflows/windows-testing.yml index 91446bed8..02c409c5a 100644 --- a/.github/workflows/windows-testing.yml +++ b/.github/workflows/windows-testing.yml @@ -8,4 +8,4 @@ jobs: steps: - run: | - dir "C:\Program Files\Java" + dir "C:\Program Files\Java\jdk8u275-b01\include" From 951e439703f6f9b40e91ce4bec6571c75e49a85e Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 13:06:13 +0100 Subject: [PATCH 59/82] First attempt at building Java bindings --- .github/workflows/build-windows-package.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 151fd0548..92f83b913 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -57,8 +57,15 @@ jobs: path: C:\tmp-dist\* if-no-files-found: error - # - name: Build Java bindings - # + - name: Build Java bindings + shell: msys2 {0} + run: | + cd src/runtime/java + make \ + JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/local/include\" " \ + WINDOWS_LDFLAGS="-L\"/mingw64/local/lib\" -no-undefined" + make install + # - name: Upload Java bindings to artifact # # - name: Build Python bindings From f8da24c5ec35504a1192cb494ebe1d27aa172b04 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 15:36:13 +0100 Subject: [PATCH 60/82] Change include path when building Java bindings in Windows build --- .github/workflows/build-windows-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 92f83b913..7d1bcc2a1 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -62,8 +62,8 @@ jobs: run: | cd src/runtime/java make \ - JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/local/include\" " \ - WINDOWS_LDFLAGS="-L\"/mingw64/local/lib\" -no-undefined" + JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/include\" " \ + WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined" make install # - name: Upload Java bindings to artifact From 9932b10bf191b6da19a2c64d5c7750b7525243ec Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 15:48:22 +0100 Subject: [PATCH 61/82] Add -D__int64=int64_t flag to Java Windows build --- .github/workflows/build-windows-package.yml | 19 +++++-------------- .github/workflows/windows-testing.yml | 11 ----------- 2 files changed, 5 insertions(+), 25 deletions(-) delete mode 100644 .github/workflows/windows-testing.yml diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 7d1bcc2a1..5db2458ac 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -50,37 +50,28 @@ jobs: make install cp /mingw64/bin/*.dll /c/tmp-dist - - name: Upload C runtime to artifact - uses: actions/upload-artifact@v2 - with: - name: gf-${{ github.sha }}-windows - path: C:\tmp-dist\* - if-no-files-found: error - - name: Build Java bindings shell: msys2 {0} run: | cd src/runtime/java make \ JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/include\" " \ - WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined" + WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined -D__int64=int64_t" make install + # cp ... /c/tmp-dist - # - name: Upload Java bindings to artifact - # # - name: Build Python bindings - # - # - name: Upload Python bindings to artifact - name: Build GF run: | cabal install --only-dependencies -fserver cabal configure -fserver cabal build + copy dist\build\gf\gf.exe C:\tmp-dist - - name: Upload exe to artifact + - name: Upload artifact uses: actions/upload-artifact@v2 with: name: gf-${{ github.sha }}-windows - path: dist\build\gf\gf.exe + path: C:\tmp-dist\* if-no-files-found: error diff --git a/.github/workflows/windows-testing.yml b/.github/workflows/windows-testing.yml deleted file mode 100644 index 02c409c5a..000000000 --- a/.github/workflows/windows-testing.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: Windows testing - -on: push - -jobs: - run: - runs-on: windows-2019 - - steps: - - run: | - dir "C:\Program Files\Java\jdk8u275-b01\include" From aad2ba61d4955e6ef1aa5008571acb641e01651c Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 15:59:01 +0100 Subject: [PATCH 62/82] Move flag --- .github/workflows/build-windows-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 5db2458ac..59c03d92e 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -55,8 +55,8 @@ jobs: run: | cd src/runtime/java make \ - JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/include\" " \ - WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined -D__int64=int64_t" + JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/include\" -D__int64=int64_t" \ + WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined" make install # cp ... /c/tmp-dist From 32f451f1d731d30c9b7381f3216e36d91c1a2753 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 20:29:04 +0100 Subject: [PATCH 63/82] Add jdk/bin to path --- .github/workflows/build-windows-package.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 59c03d92e..9c19b26ea 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -53,6 +53,9 @@ jobs: - name: Build Java bindings shell: msys2 {0} run: | + echo $PATH + export PATH="${PATH}:/c/Program Files/Java/jdk8u275-b01/bin" + cd src/runtime/java make \ JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/include\" -D__int64=int64_t" \ From 7501a7916e6e940a7530ade697c87d57b873c211 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 20:47:09 +0100 Subject: [PATCH 64/82] Copy jpgf.jar to dist --- .github/workflows/build-windows-package.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 9c19b26ea..a767cc8f4 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -48,20 +48,19 @@ jobs: ./configure make make install - cp /mingw64/bin/*.dll /c/tmp-dist + cp /mingw64/bin/libpgf-0.dll /c/tmp-dist + cp /mingw64/bin/libgu-0.dll /c/tmp-dist - name: Build Java bindings shell: msys2 {0} run: | - echo $PATH export PATH="${PATH}:/c/Program Files/Java/jdk8u275-b01/bin" - cd src/runtime/java make \ JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/include\" -D__int64=int64_t" \ WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined" make install - # cp ... /c/tmp-dist + cp /usr/local/lib/jpgf.jar /c/tmp-dist # - name: Build Python bindings From 78c1c099df93f7bc3d10bf317c6e17d68eb0da11 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 21:08:56 +0100 Subject: [PATCH 65/82] Find jpgf.jar --- .github/workflows/build-windows-package.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index a767cc8f4..e69f9cfbe 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -60,7 +60,8 @@ jobs: JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/include\" -D__int64=int64_t" \ WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined" make install - cp /usr/local/lib/jpgf.jar /c/tmp-dist + find /mingw64 -name jpgf.jar + cp /mingw64/lib/jpgf.jar /c/tmp-dist # - name: Build Python bindings From 4bcde7d6a21823c180e49fda53c4290a4804df16 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 22:09:37 +0100 Subject: [PATCH 66/82] Copy compiled Java files from local --- .github/workflows/build-windows-package.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index e69f9cfbe..0be77e614 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -61,7 +61,8 @@ jobs: WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined" make install find /mingw64 -name jpgf.jar - cp /mingw64/lib/jpgf.jar /c/tmp-dist + cp .libs//msys-jpgf-0.dll /c/tmp-dist + cp jpgf.jar /c/tmp-dist # - name: Build Python bindings From 3e1c69da2138ad2d494e8ff0c30003f1dfbfb9aa Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 22:46:28 +0100 Subject: [PATCH 67/82] First attempt at building Python bindings for Windows --- .github/workflows/build-windows-package.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 0be77e614..2bd5051c3 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -60,11 +60,16 @@ jobs: JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/include\" -D__int64=int64_t" \ WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined" make install - find /mingw64 -name jpgf.jar - cp .libs//msys-jpgf-0.dll /c/tmp-dist + cp .libs//msys-jpgf-0.dll /c/tmp-dist/jpgf.dll cp jpgf.jar /c/tmp-dist - # - name: Build Python bindings + - name: Build Python bindings + shell: msys2 {0} + run: | + cd src/runtime/python + python setup.py build + python setup.py install + cp build/*/pgf.so /c/tmp-dist - name: Build GF run: | From cf6468a45283bdf85df13a78ef2a3082572972d9 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 23:03:46 +0100 Subject: [PATCH 68/82] Install Python dev tools --- .github/workflows/build-windows-package.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 2bd5051c3..1e6fd8722 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -67,6 +67,7 @@ jobs: shell: msys2 {0} run: | cd src/runtime/python + pip install python-dev-tools python setup.py build python setup.py install cp build/*/pgf.so /c/tmp-dist From 88252cb107aefc6fadce063c4dd3e80b73061c09 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Tue, 24 Nov 2020 23:21:05 +0100 Subject: [PATCH 69/82] Try build Python bindings not using msys2 --- .github/workflows/build-windows-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 1e6fd8722..5360d2b9c 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -64,13 +64,13 @@ jobs: cp jpgf.jar /c/tmp-dist - name: Build Python bindings - shell: msys2 {0} + # shell: msys2 {0} run: | cd src/runtime/python pip install python-dev-tools python setup.py build python setup.py install - cp build/*/pgf.so /c/tmp-dist + # cp build/*/pgf.so /c/tmp-dist - name: Build GF run: | From 0ed6b726a2c9a2365fadc05a75177c569469b4fd Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Wed, 25 Nov 2020 20:47:47 +0100 Subject: [PATCH 70/82] Add lib/include envvars for Python build --- .github/workflows/build-windows-package.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 5360d2b9c..e56184840 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -34,6 +34,7 @@ jobs: - name: Install build tools run: | cabal install alex happy + pip install python-dev-tools - name: Prepare dist folder shell: msys2 {0} @@ -64,10 +65,11 @@ jobs: cp jpgf.jar /c/tmp-dist - name: Build Python bindings - # shell: msys2 {0} + env: + EXTRA_INCLUDE_DIRS: /usr/local/include + EXTRA_LIB_DIRS: /usr/local/lib run: | cd src/runtime/python - pip install python-dev-tools python setup.py build python setup.py install # cp build/*/pgf.so /c/tmp-dist From 24bbeb31df6558c85ac7ff5a47e4bcfc532dfafe Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 26 Nov 2020 22:38:23 +0100 Subject: [PATCH 71/82] Change extra lib/include directories --- .github/workflows/build-windows-package.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index e56184840..6ebe71c06 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -64,10 +64,13 @@ jobs: cp .libs//msys-jpgf-0.dll /c/tmp-dist/jpgf.dll cp jpgf.jar /c/tmp-dist + - run: where python + - name: Build Python bindings + shell: msys2 {0} env: - EXTRA_INCLUDE_DIRS: /usr/local/include - EXTRA_LIB_DIRS: /usr/local/lib + EXTRA_INCLUDE_DIRS: /mingw64/include + EXTRA_LIB_DIRS: /mingw64/lib run: | cd src/runtime/python python setup.py build From 0632824b997965f2099676fa94e61b0314c2bd2b Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 26 Nov 2020 23:02:16 +0100 Subject: [PATCH 72/82] Need to add pip to msys2 path --- .github/workflows/build-windows-package.yml | 34 +++++++++++++-------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 6ebe71c06..9522d018b 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -24,18 +24,6 @@ jobs: base-devel gcc - - name: Setup Haskell - uses: actions/setup-haskell@v1 - id: setup-haskell-cabal - with: - ghc-version: ${{ matrix.ghc }} - cabal-version: ${{ matrix.cabal }} - - - name: Install build tools - run: | - cabal install alex happy - pip install python-dev-tools - - name: Prepare dist folder shell: msys2 {0} run: | @@ -64,7 +52,15 @@ jobs: cp .libs//msys-jpgf-0.dll /c/tmp-dist/jpgf.dll cp jpgf.jar /c/tmp-dist - - run: where python + - run: echo %PATH% + + - shell: msys2 {0} + run: echo $PATH + + - name: Install Python build tools + shell: msys2 {0} + run: | + pip install python-dev-tools - name: Build Python bindings shell: msys2 {0} @@ -72,11 +68,23 @@ jobs: EXTRA_INCLUDE_DIRS: /mingw64/include EXTRA_LIB_DIRS: /mingw64/lib run: | + pip install python-dev-tools cd src/runtime/python python setup.py build python setup.py install # cp build/*/pgf.so /c/tmp-dist + - name: Setup Haskell + uses: actions/setup-haskell@v1 + id: setup-haskell-cabal + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} + + - name: Install Haskell build tools + run: | + cabal install alex happy + - name: Build GF run: | cabal install --only-dependencies -fserver From 54c0949354590287dc745b6a2f86a5ea3dc7a734 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 26 Nov 2020 23:16:15 +0100 Subject: [PATCH 73/82] Change echo path command in powershell --- .github/workflows/build-windows-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 9522d018b..30c74c0bf 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -52,7 +52,7 @@ jobs: cp .libs//msys-jpgf-0.dll /c/tmp-dist/jpgf.dll cp jpgf.jar /c/tmp-dist - - run: echo %PATH% + - run: $Env:Path - shell: msys2 {0} run: echo $PATH From 78f42774dab8364d9204e73e7ea965f143b2e571 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 26 Nov 2020 23:30:47 +0100 Subject: [PATCH 74/82] Inherit path when running pip --- .github/workflows/build-windows-package.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 30c74c0bf..04afa2013 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -59,6 +59,8 @@ jobs: - name: Install Python build tools shell: msys2 {0} + env: + MSYS2_PATH_TYPE: inherit run: | pip install python-dev-tools @@ -68,7 +70,6 @@ jobs: EXTRA_INCLUDE_DIRS: /mingw64/include EXTRA_LIB_DIRS: /mingw64/lib run: | - pip install python-dev-tools cd src/runtime/python python setup.py build python setup.py install From 6b7e9c8c7ae67069e43fa963625e6058cb30a7cb Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 26 Nov 2020 23:40:08 +0100 Subject: [PATCH 75/82] Inherit path with Python compilation too --- .github/workflows/build-windows-package.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 04afa2013..63e99b4ac 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -67,6 +67,7 @@ jobs: - name: Build Python bindings shell: msys2 {0} env: + MSYS2_PATH_TYPE: inherit EXTRA_INCLUDE_DIRS: /mingw64/include EXTRA_LIB_DIRS: /mingw64/lib run: | From 629a574dfa0142526582b2c2436c3d60c65799b8 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Thu, 26 Nov 2020 23:57:09 +0100 Subject: [PATCH 76/82] Considerable updates to 3.11 download page --- download/index-3.11.md | 131 ++++++++++++++++++++--------------------- 1 file changed, 64 insertions(+), 67 deletions(-) diff --git a/download/index-3.11.md b/download/index-3.11.md index 4e225f631..78b6af4bc 100644 --- a/download/index-3.11.md +++ b/download/index-3.11.md @@ -2,56 +2,60 @@ title: Grammatical Framework Download and Installation ... -**GF 3.11** was released on ? December 2020. +**GF 3.11** was released on ... December 2020. What's new? See the [release notes](release-3.11.html). -## Binary packages +#### Note: GF core and RGL -Unlike previous versions, these binary packages include only the GF core (compiler and runtime). +The following instructions explain how to install **GF core**, i.e. the compiler, shell and run-time systems. +Obtaining the **Resource Grammar Library (RGL)** is done separately; see the section at the bottom of this page. -| Platform | Download | Features | How to install | -|:----------------|:---------------------------------------------------|:---------------|:---------------------------------| -| macOS | [gf-3.11.pkg](gf-3.11.pkg) | GF, S, C, J, P | Double-click on the package icon | -| Ubuntu (32-bit) | [gf\_3.11\_i386.deb](gf_3.11_i386.deb) | GF, S, C, J, P | `sudo dpkg -i gf_3.11_i386.deb` | -| Ubuntu (64-bit) | [gf\_3.11\_amd64.deb](gf_3.11_amd64.deb) | GF, S, C, J, P | `sudo dpkg -i gf_3.11_amd64.deb` | -| Windows | [gf-3.11-bin-windows.zip](gf-3.11-bin-windows.zip) | GF, S | `unzip gf-3.11-bin-windows.zip` | +## Installing from a binary package -**Features** +Binary packages are available for Debian/Ubuntu, macOS, and Windows and include: -- GF = GF shell and grammar compiler -- S = `gf -server` mode -- C = C run-time system -- J/P = Java/Python binding to the C run-time system +- GF shell and grammar compiler +- `gf -server` mode +- C run-time system +- Java & Python bindings to the C run-time system -### Notes +Unlike in previous versions, the binaries **do not** include the RGL. -The Windows package is installed by just unpacking it anywhere. You will -probably need to set the `PATH` and `GF_LIB_PATH` environment variables, -see Inari's notes on [Installing GF on Windows](http://www.grammaticalframework.org/~inari/gf-windows.html#toc3). +[Binary packages on GitHub](https://github.com/GrammaticalFramework/gf-core/releases/tag/RELEASE-3.11) -The Ubuntu `.deb` packages should work on Ubuntu 16.04 and 18.04 and -similar Linux distributions. The `.deb` packages were updated -to version 3.10-2 after the release of GF 3.10. -(Because of a packaging bug the Resource Grammar Library was missing -in the 3.10-1 packages.) +### Debian/Ubuntu -The packages for macOS (Mac OS X) should work on at least 10.13 and -10.14 (High Sierra and Mojave) +To install the package use: +``` +sudo dpkg -i gf_3.11.deb +``` + +The Ubuntu `.deb` packages should work on Ubuntu 16.04, 18.04 and similar Linux distributions. + +### macOS + +To install the package, just double-click it and follow the installer instructions. + +The packages should work on at least 10.13 (High Sierra) and 10.14 (Mojave). + +### Windows + +To install the package, unpack it anywhere. + +You will probably need to update the `PATH` environment variable to include your chosen install location. + ## Installing the latest release from source [GF is on Hackage](http://hackage.haskell.org/package/gf), so under normal circumstances the procedure is fairly simple: -1. Install a recent version of the [Haskell - Platform](http://hackage.haskell.org/platform) (see note below) +1. Install a recent version of the [Haskell Platform](http://hackage.haskell.org/platform) (see note below) 2. `cabal update` 3. On Linux: install some C libraries from your Linux distribution (see note below) 4. `cabal install gf` -This installs the GF executable and Haskell libraries, but **does not include the RGL**. - You can also download the source code release from [GitHub](https://github.com/GrammaticalFramework/gf-core/releases), and follow the instructions below under **Installing from the latest developer source code**. @@ -59,22 +63,14 @@ and follow the instructions below under **Installing from the latest developer s **Installation location** -The above steps installs GF for a single user. The executables are put -in `$HOME/.cabal/bin` (or, with recent versions of the Haskell platform -on Mac OS X, in `$HOME/Library/Haskell/bin`), so it is a good idea to -put a line in your `.bash_profile` or `.profile` to add that directory -to you path: +The above steps installs GF for a single user. +The executables are put in `$HOME/.cabal/bin` (or on macOS in `$HOME/Library/Haskell/bin`), +so you might want to add this directory to your path (in `.bash_profile` or similar): ``` PATH=$HOME/.cabal/bin:$PATH ``` -or - -``` -PATH=$HOME/Library/Haskell/bin:$PATH -``` - **Build tools** In order to compile GF you need the build tools **Alex** and **Happy**. @@ -98,8 +94,7 @@ Here is one way to do this: **GHC version** -The GF source code has been updated to compile with GHC 8.4. -Using older versions of GHC (e.g. 8.2, 8.0 and 7.10) should still work too. +The GF source code has been updated to compile with GHC versions 7.10 through to 8.8. ## Installing from the latest developer source code @@ -131,26 +126,6 @@ The above notes for installing from source apply also in these cases. For more info on working with the GF source code, see the [GF Developers Guide](../doc/gf-developers.html). -## Installing the RGL from source - -To install the RGL from source, -you can download a release from [GitHub](https://github.com/GrammaticalFramework/gf-rgl/releases) -or get the latest version by cloning the repository: - -``` -git clone https://github.com/GrammaticalFramework/gf-rgl.git -``` - -In both cases, once you have the RGL sources you can install them by running: - -``` -make -``` - -in the RGL folder. -This assumes that you already have GF installed. -For more details about building the RGL, see the [RGL README](https://github.com/GrammaticalFramework/gf-rgl/blob/master/README.md). - ## Installing the Python bindings from PyPI The Python library is available on PyPI as `pgf`, so it can be installed using: @@ -159,11 +134,33 @@ The Python library is available on PyPI as `pgf`, so it can be installed using: pip install pgf ``` -We provide binary wheels for Linux and OSX (with Windows missing so far), which -include the C runtime and a ready-to-go. If there is no binary distribution for -your platform, this will install the source tarball, which will attempt to build -the binding during installation, and requires the GF C runtime to be installed on -your system. +We provide binary wheels for Linux and macOS, which include the C runtime and are ready-to-go. +If there is no binary distribution for your platform, this will install the source tarball, +which will attempt to build the binding during installation, +and requires the GF C runtime to be installed on your system. + +--- + +## Installing the RGL from a binary release + +Binary releases of the RGL are made available on [GitHub](https://github.com/GrammaticalFramework/gf-rgl/releases). +In general the steps to follow are: + +1. Download a binary release and extract it somewhere on your system. +2. Set the environment variable `GF_LIB_PATH` to point to wherever you extracted the RGL. + +## Installing the RGL from source + +To compile the RGL, you will need to have GF already installed and in your path. + +1. Obtain the RGL source code, either by: + - cloning with `git clone https://github.com/GrammaticalFramework/gf-rgl.git` + - downloading a source archive [here](https://github.com/GrammaticalFramework/gf-rgl/archive/master.zip) +2. Run `make` in the source code folder. + +For more options, see the [RGL README](https://github.com/GrammaticalFramework/gf-rgl/blob/master/README.md). + +--- ## Older releases From 169f2c786d6f518acb8c9c6eeff537177fe87885 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Fri, 27 Nov 2020 00:00:44 +0100 Subject: [PATCH 77/82] Install pip in msys2 --- .github/workflows/build-windows-package.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 63e99b4ac..69d0bd7bd 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -23,6 +23,7 @@ jobs: install: >- base-devel gcc + python-pip - name: Prepare dist folder shell: msys2 {0} @@ -59,15 +60,12 @@ jobs: - name: Install Python build tools shell: msys2 {0} - env: - MSYS2_PATH_TYPE: inherit run: | pip install python-dev-tools - name: Build Python bindings shell: msys2 {0} env: - MSYS2_PATH_TYPE: inherit EXTRA_INCLUDE_DIRS: /mingw64/include EXTRA_LIB_DIRS: /mingw64/lib run: | From 921a8981fbf6e67cea9236edb99f8cd3285a1bf6 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Fri, 27 Nov 2020 00:11:54 +0100 Subject: [PATCH 78/82] Install python-devel in msys2 --- .github/workflows/build-windows-package.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index 69d0bd7bd..ab34d6f0c 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -23,7 +23,7 @@ jobs: install: >- base-devel gcc - python-pip + python-devel - name: Prepare dist folder shell: msys2 {0} @@ -58,11 +58,6 @@ jobs: - shell: msys2 {0} run: echo $PATH - - name: Install Python build tools - shell: msys2 {0} - run: | - pip install python-dev-tools - - name: Build Python bindings shell: msys2 {0} env: From 8f3a7a3b6a04f3e93060cd9293da7f467ff5e572 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Fri, 27 Nov 2020 00:51:38 +0100 Subject: [PATCH 79/82] Copy things into subfolders --- .github/workflows/build-windows-package.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index ab34d6f0c..fc788aa94 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -29,6 +29,9 @@ jobs: shell: msys2 {0} run: | mkdir /c/tmp-dist + mkdir /c/tmp-dist/c + mkdir /c/tmp-dist/java + mkdir /c/tmp-dist/python - name: Build C runtime shell: msys2 {0} @@ -38,8 +41,8 @@ jobs: ./configure make make install - cp /mingw64/bin/libpgf-0.dll /c/tmp-dist - cp /mingw64/bin/libgu-0.dll /c/tmp-dist + cp /mingw64/bin/libpgf-0.dll /c/tmp-dist/c + cp /mingw64/bin/libgu-0.dll /c/tmp-dist/c - name: Build Java bindings shell: msys2 {0} @@ -50,13 +53,8 @@ jobs: JNI_INCLUDES="-I \"/c/Program Files/Java/jdk8u275-b01/include\" -I \"/c/Program Files/Java/jdk8u275-b01/include/win32\" -I \"/mingw64/include\" -D__int64=int64_t" \ WINDOWS_LDFLAGS="-L\"/mingw64/lib\" -no-undefined" make install - cp .libs//msys-jpgf-0.dll /c/tmp-dist/jpgf.dll - cp jpgf.jar /c/tmp-dist - - - run: $Env:Path - - - shell: msys2 {0} - run: echo $PATH + cp .libs//msys-jpgf-0.dll /c/tmp-dist/java/jpgf.dll + cp jpgf.jar /c/tmp-dist/java - name: Build Python bindings shell: msys2 {0} @@ -67,7 +65,7 @@ jobs: cd src/runtime/python python setup.py build python setup.py install - # cp build/*/pgf.so /c/tmp-dist + cp /usr/lib/python3.8/site-packages/pgf* /c/tmp-dist/python - name: Setup Haskell uses: actions/setup-haskell@v1 From 8dc1ed83b603d5ebb170912b4cefec0cf353288c Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 30 Nov 2020 13:01:51 +0100 Subject: [PATCH 80/82] Update RELEASE.md --- .github/workflows/build-windows-package.yml | 1 - RELEASE.md | 44 +++++++++++++-------- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-windows-package.yml index fc788aa94..df6f77be9 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-windows-package.yml @@ -1,7 +1,6 @@ name: Build Windows Package on: - push: # testing until merged into master workflow_dispatch: jobs: diff --git a/RELEASE.md b/RELEASE.md index 131a37b5d..0c304fe51 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,6 +1,8 @@ # GF Core releases -🚨 WARNING! The information here is preliminary! +**Note:** +The RGL is now released completely separately from GF Core. +See the [RGL's RELEASE.md](https://github.com/GrammaticalFramework/gf-rgl/blob/master/RELEASE.md). ## Creating a new release @@ -11,37 +13,47 @@ 1. Create `download/index-X.Y.md` with installation instructions. 1. Create `download/release-X.Y.md` with changelog information. 1. Update `download/index.html` to redirect to the new version. -1. Add announcement in news section in `index.html` +1. Add announcement in news section in `index.html`. **Version numbers** -1. Update version number in `gf.cabal` (ommitting `-git` suffix) -1. Add a new line in `debian/changelog` +1. Update version number in `gf.cabal` (ommitting `-git` suffix). +1. Add a new line in `debian/changelog`. ### 2. Create GitHub release -1. When the above changes are committed to the `master` branch in the repository, - check that all builds are successful: - - https://github.com/GrammaticalFramework/gf-core/actions - - https://travis-ci.org/github/GrammaticalFramework/gf-core -1. Create a GitHub release here: https://github.com/GrammaticalFramework/gf-core/releases/new - with a tag format `RELEASE-X.Y` +1. When the above changes are committed to the `master` branch in the repository + and pushed, check that all CI workflows are successful (fixing as necessary): + - + - +1. Create a GitHub release [here](https://github.com/GrammaticalFramework/gf-core/releases/new) using tag format `RELEASE-X.Y`. ### 3. Binary packages -Build and attach binaries to the release by running the relevant GitHub Actions workflows (TODO): +The binaries will be built automatically by the GitHub Actions workflows, +but the generated artifacts must be manually attached to the release as _assets_. -1. Go to https://github.com/GrammaticalFramework/gf-rgl/actions -1. Click "Build [platform] package" under _Workflows_ -1. Click "Run workflow" and specify the tag `RELEASE-X.Y` +1. Go to . +1. Click "Build [platform] Package" under _Workflows_. +1. Choose the workflow run corresponding to the release commit SHA. +1. Download the artifact locally, then add to the release with a name `gf-X.Y-PLATFORM.EXT` (e.g. `gf-3.11-macos.pkg`). ### 4. Upload to Hackage 1. Run `make sdist` -1. Visit `https://hackage.haskell.org/upload` and upload the file `dist/gf-X.Y.tar.gz`, - OR upload directly with Cabal (≥2.4): `cabal upload dist/gf-X.Y.tar.gz` +1. Upload the package, either: + 1. **Manually**: visit and upload the file `dist/gf-X.Y.tar.gz` + 2. **via Cabal (≥2.4)**: `cabal upload dist/gf-X.Y.tar.gz` 1. If the documentation-building fails on the Hackage server, do: ``` cabal v2-haddock --builddir=dist/docs --haddock-for-hackage --enable-doc cabal upload --documentation dist/docs/*-docs.tar.gz ``` + +## Miscellaneous + +### What is the tag `GF-3.10`? + +For GF 3.10, the Core and RGL repositories had already been separated, however +the binary packages still included the RGL. `GF-3.10` is a tag that was created +in both repositories ([gf-core](https://github.com/GrammaticalFramework/gf-core/releases/tag/GF-3.10) and [gf-rgl](https://github.com/GrammaticalFramework/gf-rgl/releases/tag/GF-3.10)) to indicate which versions of each went into the binaries. From 4223935b124a0b16053aef719abccdc5fca36287 Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 30 Nov 2020 20:57:20 +0100 Subject: [PATCH 81/82] Combine binary workflows into one with multiple jobs --- ...-package.yml => build-binary-packages.yml} | 91 ++++++++++++++++++- .github/workflows/build-debian-package.yml | 45 --------- .github/workflows/build-macos-package.yml | 43 --------- 3 files changed, 86 insertions(+), 93 deletions(-) rename .github/workflows/{build-windows-package.yml => build-binary-packages.yml} (56%) delete mode 100644 .github/workflows/build-debian-package.yml delete mode 100644 .github/workflows/build-macos-package.yml diff --git a/.github/workflows/build-windows-package.yml b/.github/workflows/build-binary-packages.yml similarity index 56% rename from .github/workflows/build-windows-package.yml rename to .github/workflows/build-binary-packages.yml index df6f77be9..e387ae9b1 100644 --- a/.github/workflows/build-windows-package.yml +++ b/.github/workflows/build-binary-packages.yml @@ -1,15 +1,96 @@ -name: Build Windows Package +name: Build Binary Packages on: workflow_dispatch: + release: jobs: - build: - name: Build on ${{ matrix.os }} - runs-on: ${{ matrix.os }} + +# --- + + ubuntu: + name: Build Ubuntu package + runs-on: ubuntu-18.04 + # env: + # LC_ALL: C.UTF-8 + + steps: + - uses: actions/checkout@v2 + + - name: Install build tools + run: | + sudo apt update + sudo apt install -y \ + make \ + dpkg-dev \ + debhelper \ + haskell-platform \ + libghc-json-dev \ + python-dev \ + default-jdk \ + libtool-bin + + - name: Build Debian package + run: | + make deb + + - name: Copy package + run: | + cp ../gf_*.deb dist/ + + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: gf-${{ github.sha }}-debian + path: dist/gf_*.deb + if-no-files-found: error + +# --- + + macos: + name: Build macOS package + runs-on: macos-10.15 + strategy: + matrix: + ghc: ["8.6.5"] + cabal: ["2.4"] + + steps: + - uses: actions/checkout@v2 + + - name: Setup Haskell + uses: actions/setup-haskell@v1 + id: setup-haskell-cabal + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} + + - name: Install build tools + run: | + brew install \ + automake + cabal v1-install alex happy + + - name: Build macOS package + run: | + sudo mkdir -p /Library/Java/Home + sudo ln -s /usr/local/opt/openjdk/include /Library/Java/Home/include + make pkg + + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: gf-${{ github.sha }}-macos + path: dist/gf-*.pkg + if-no-files-found: error + +# --- + + windows: + name: Build Windows package + runs-on: windows-2019 strategy: matrix: - os: [windows-2019] ghc: ["8.6.5"] cabal: ["2.4"] diff --git a/.github/workflows/build-debian-package.yml b/.github/workflows/build-debian-package.yml deleted file mode 100644 index 02a0b3846..000000000 --- a/.github/workflows/build-debian-package.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Build Debian Package - -on: - workflow_dispatch: - -jobs: - build: - name: Build on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-18.04] - env: - LC_ALL: C.UTF-8 - - steps: - - uses: actions/checkout@v2 - - - name: Install build tools - run: | - sudo apt update - sudo apt install -y \ - make \ - dpkg-dev \ - debhelper \ - haskell-platform \ - libghc-json-dev \ - python-dev \ - default-jdk \ - libtool-bin - - - name: Build Debian package - run: | - make deb - - - name: Copy package - run: | - cp ../gf_*.deb dist/ - - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: gf-${{ github.sha }}-debian - path: dist/gf_*.deb - if-no-files-found: error diff --git a/.github/workflows/build-macos-package.yml b/.github/workflows/build-macos-package.yml deleted file mode 100644 index 1ebf5dfa6..000000000 --- a/.github/workflows/build-macos-package.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Build macOS Package - -on: - workflow_dispatch: - -jobs: - build: - name: Build on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [macos-10.15] - ghc: ["8.6.5"] - cabal: ["2.4"] - - steps: - - uses: actions/checkout@v2 - - - name: Setup Haskell - uses: actions/setup-haskell@v1 - id: setup-haskell-cabal - with: - ghc-version: ${{ matrix.ghc }} - cabal-version: ${{ matrix.cabal }} - - - name: Install build tools - run: | - brew install \ - automake - cabal v1-install alex happy - - - name: Build macOS package - run: | - sudo mkdir -p /Library/Java/Home - sudo ln -s /usr/local/opt/openjdk/include /Library/Java/Home/include - make pkg - - - name: Upload artifact - uses: actions/upload-artifact@v2 - with: - name: gf-${{ github.sha }}-macos - path: dist/gf-*.pkg - if-no-files-found: error From a7a6eb55811a234a46b650b77357f0589ba6a46b Mon Sep 17 00:00:00 2001 From: "John J. Camilleri" Date: Mon, 30 Nov 2020 21:34:50 +0100 Subject: [PATCH 82/82] Update release instructions --- .github/workflows/build-binary-packages.yml | 2 +- RELEASE.md | 31 ++++++++++++--------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-binary-packages.yml b/.github/workflows/build-binary-packages.yml index e387ae9b1..e33022e6e 100644 --- a/.github/workflows/build-binary-packages.yml +++ b/.github/workflows/build-binary-packages.yml @@ -41,7 +41,7 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v2 with: - name: gf-${{ github.sha }}-debian + name: gf-${{ github.sha }}-ubuntu path: dist/gf_*.deb if-no-files-found: error diff --git a/RELEASE.md b/RELEASE.md index 0c304fe51..3a771b78d 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -11,14 +11,14 @@ See the [RGL's RELEASE.md](https://github.com/GrammaticalFramework/gf-rgl/blob/m **Web pages** 1. Create `download/index-X.Y.md` with installation instructions. -1. Create `download/release-X.Y.md` with changelog information. -1. Update `download/index.html` to redirect to the new version. -1. Add announcement in news section in `index.html`. +2. Create `download/release-X.Y.md` with changelog information. +3. Update `download/index.html` to redirect to the new version. +4. Add announcement in news section in `index.html`. **Version numbers** 1. Update version number in `gf.cabal` (ommitting `-git` suffix). -1. Add a new line in `debian/changelog`. +2. Add a new line in `debian/changelog`. ### 2. Create GitHub release @@ -26,25 +26,30 @@ See the [RGL's RELEASE.md](https://github.com/GrammaticalFramework/gf-rgl/blob/m and pushed, check that all CI workflows are successful (fixing as necessary): - - -1. Create a GitHub release [here](https://github.com/GrammaticalFramework/gf-core/releases/new) using tag format `RELEASE-X.Y`. +2. Create a GitHub release [here](https://github.com/GrammaticalFramework/gf-core/releases/new): + - Tag version format `RELEASE-X.Y` + - Title: "GF X.Y" + - Description: mention major changes since last release +3. Publish the release to trigger the building of the binary packages (below). ### 3. Binary packages -The binaries will be built automatically by the GitHub Actions workflows, -but the generated artifacts must be manually attached to the release as _assets_. +The binaries will be built automatically by GitHub Actions when the release is created, +but the generated _artifacts_ must be manually attached to the release as _assets_. -1. Go to . -1. Click "Build [platform] Package" under _Workflows_. -1. Choose the workflow run corresponding to the release commit SHA. -1. Download the artifact locally, then add to the release with a name `gf-X.Y-PLATFORM.EXT` (e.g. `gf-3.11-macos.pkg`). +1. Go to the [actions page](https://github.com/GrammaticalFramework/gf-core/actions) and click "Build Binary Packages" under _Workflows_. +2. Choose the workflow run corresponding to the newly created release. +3. Download the artifacts locally. Extract the Ubuntu and macOS ones to get the `.deb` and `.pkg` files. +4. Go back to the [releases page](https://github.com/GrammaticalFramework/gf-core/releases) and click to edit the release information. +5. Add the downloaded artifacts as release assets, giving them names with format `gf-X.Y-PLATFORM.EXT` (e.g. `gf-3.11-macos.pkg`). ### 4. Upload to Hackage 1. Run `make sdist` -1. Upload the package, either: +2. Upload the package, either: 1. **Manually**: visit and upload the file `dist/gf-X.Y.tar.gz` 2. **via Cabal (≥2.4)**: `cabal upload dist/gf-X.Y.tar.gz` -1. If the documentation-building fails on the Hackage server, do: +3. If the documentation-building fails on the Hackage server, do: ``` cabal v2-haddock --builddir=dist/docs --haddock-for-hackage --enable-doc cabal upload --documentation dist/docs/*-docs.tar.gz