mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-08 20:59:30 -06:00
Update release scripts for 3.12
This commit is contained in:
committed by
Andreas Källberg
parent
e7c0b6dada
commit
4fea7cf37f
76
.github/workflows/build-binary-packages.yml
vendored
76
.github/workflows/build-binary-packages.yml
vendored
@@ -2,7 +2,7 @@ name: Build Binary Packages
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
release:
|
release:
|
||||||
types: ["created"]
|
types: ["created"]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -13,9 +13,9 @@ jobs:
|
|||||||
name: Build Ubuntu package
|
name: Build Ubuntu package
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
ghc: ["9.6"]
|
||||||
- ubuntu-20.04
|
cabal: ["3.10"]
|
||||||
- ubuntu-22.04
|
os: ["ubuntu-24.04"]
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
@@ -25,12 +25,13 @@ jobs:
|
|||||||
# Note: `haskell-platform` is listed as requirement in debian/control,
|
# Note: `haskell-platform` is listed as requirement in debian/control,
|
||||||
# which is why it's installed using apt instead of the Setup Haskell action.
|
# which is why it's installed using apt instead of the Setup Haskell action.
|
||||||
|
|
||||||
# - name: Setup Haskell
|
- name: Setup Haskell
|
||||||
# uses: actions/setup-haskell@v1
|
uses: haskell-actions/setup@v2
|
||||||
# id: setup-haskell-cabal
|
id: setup-haskell-cabal
|
||||||
# with:
|
with:
|
||||||
# ghc-version: ${{ matrix.ghc }}
|
ghc-version: ${{ matrix.ghc }}
|
||||||
# cabal-version: ${{ matrix.cabal }}
|
cabal-version: ${{ matrix.cabal }}
|
||||||
|
if: matrix.os == 'ubuntu-24.04'
|
||||||
|
|
||||||
- name: Install build tools
|
- name: Install build tools
|
||||||
run: |
|
run: |
|
||||||
@@ -39,14 +40,15 @@ jobs:
|
|||||||
make \
|
make \
|
||||||
dpkg-dev \
|
dpkg-dev \
|
||||||
debhelper \
|
debhelper \
|
||||||
haskell-platform \
|
|
||||||
libghc-json-dev \
|
libghc-json-dev \
|
||||||
python-dev \
|
|
||||||
default-jdk \
|
default-jdk \
|
||||||
libtool-bin
|
python-dev-is-python3 \
|
||||||
|
libtool-bin
|
||||||
|
cabal install alex happy
|
||||||
|
|
||||||
- name: Build package
|
- name: Build package
|
||||||
run: |
|
run: |
|
||||||
|
export PYTHONPATH="/home/runner/work/gf-core/gf-core/debian/gf/usr/local/lib/python3.12/dist-packages/"
|
||||||
make deb
|
make deb
|
||||||
|
|
||||||
- name: Copy package
|
- name: Copy package
|
||||||
@@ -54,7 +56,7 @@ jobs:
|
|||||||
cp ../gf_*.deb dist/
|
cp ../gf_*.deb dist/
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: gf-${{ github.event.release.tag_name }}-${{ matrix.os }}.deb
|
name: gf-${{ github.event.release.tag_name }}-${{ matrix.os }}.deb
|
||||||
path: dist/gf_*.deb
|
path: dist/gf_*.deb
|
||||||
@@ -79,16 +81,16 @@ jobs:
|
|||||||
name: Build macOS package
|
name: Build macOS package
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
ghc: ["8.6.5"]
|
ghc: ["9.6"]
|
||||||
cabal: ["2.4"]
|
cabal: ["3.10"]
|
||||||
os: ["macos-10.15"]
|
os: ["macos-latest", "macos-13"]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup Haskell
|
- name: Setup Haskell
|
||||||
uses: actions/setup-haskell@v1
|
uses: haskell-actions/setup@v2
|
||||||
id: setup-haskell-cabal
|
id: setup-haskell-cabal
|
||||||
with:
|
with:
|
||||||
ghc-version: ${{ matrix.ghc }}
|
ghc-version: ${{ matrix.ghc }}
|
||||||
@@ -97,8 +99,10 @@ jobs:
|
|||||||
- name: Install build tools
|
- name: Install build tools
|
||||||
run: |
|
run: |
|
||||||
brew install \
|
brew install \
|
||||||
automake
|
automake \
|
||||||
|
libtool
|
||||||
cabal v1-install alex happy
|
cabal v1-install alex happy
|
||||||
|
pip install setuptools
|
||||||
|
|
||||||
- name: Build package
|
- name: Build package
|
||||||
run: |
|
run: |
|
||||||
@@ -107,12 +111,12 @@ jobs:
|
|||||||
make pkg
|
make pkg
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: gf-${{ github.event.release.tag_name }}-macos
|
name: gf-${{ github.event.release.tag_name }}-${{ matrix.os }}
|
||||||
path: dist/gf-*.pkg
|
path: dist/gf-*.pkg
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Rename package
|
- name: Rename package
|
||||||
run: |
|
run: |
|
||||||
mv dist/gf-*.pkg dist/gf-${{ github.event.release.tag_name }}-macos.pkg
|
mv dist/gf-*.pkg dist/gf-${{ github.event.release.tag_name }}-macos.pkg
|
||||||
@@ -132,9 +136,9 @@ jobs:
|
|||||||
name: Build Windows package
|
name: Build Windows package
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
ghc: ["8.6.5"]
|
ghc: ["9.6.7"]
|
||||||
cabal: ["2.4"]
|
cabal: ["3.10"]
|
||||||
os: ["windows-2019"]
|
os: ["windows-2022"]
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -147,6 +151,7 @@ jobs:
|
|||||||
base-devel
|
base-devel
|
||||||
gcc
|
gcc
|
||||||
python-devel
|
python-devel
|
||||||
|
autotools
|
||||||
|
|
||||||
- name: Prepare dist folder
|
- name: Prepare dist folder
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
@@ -171,7 +176,8 @@ jobs:
|
|||||||
- name: Build Java bindings
|
- name: Build Java bindings
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: |
|
run: |
|
||||||
export JDKPATH=/c/hostedtoolcache/windows/Java_Adopt_jdk/8.0.292-10/x64
|
echo $JAVA_HOME_8_X64
|
||||||
|
export JDKPATH="$(cygpath -u "${JAVA_HOME_8_X64}")"
|
||||||
export PATH="${PATH}:${JDKPATH}/bin"
|
export PATH="${PATH}:${JDKPATH}/bin"
|
||||||
cd src/runtime/java
|
cd src/runtime/java
|
||||||
make \
|
make \
|
||||||
@@ -180,6 +186,9 @@ jobs:
|
|||||||
make install
|
make install
|
||||||
cp .libs/msys-jpgf-0.dll /c/tmp-dist/java/jpgf.dll
|
cp .libs/msys-jpgf-0.dll /c/tmp-dist/java/jpgf.dll
|
||||||
cp jpgf.jar /c/tmp-dist/java
|
cp jpgf.jar /c/tmp-dist/java
|
||||||
|
if: false
|
||||||
|
|
||||||
|
# - uses: actions/setup-python@v5
|
||||||
|
|
||||||
- name: Build Python bindings
|
- name: Build Python bindings
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
@@ -188,12 +197,13 @@ jobs:
|
|||||||
EXTRA_LIB_DIRS: /mingw64/lib
|
EXTRA_LIB_DIRS: /mingw64/lib
|
||||||
run: |
|
run: |
|
||||||
cd src/runtime/python
|
cd src/runtime/python
|
||||||
|
pacman --noconfirm -S python-setuptools
|
||||||
python setup.py build
|
python setup.py build
|
||||||
python setup.py install
|
python setup.py install
|
||||||
cp /usr/lib/python3.9/site-packages/pgf* /c/tmp-dist/python
|
cp -r /usr/lib/python3.12/site-packages/pgf* /c/tmp-dist/python
|
||||||
|
|
||||||
- name: Setup Haskell
|
- name: Setup Haskell
|
||||||
uses: actions/setup-haskell@v1
|
uses: haskell-actions/setup@v2
|
||||||
id: setup-haskell-cabal
|
id: setup-haskell-cabal
|
||||||
with:
|
with:
|
||||||
ghc-version: ${{ matrix.ghc }}
|
ghc-version: ${{ matrix.ghc }}
|
||||||
@@ -205,13 +215,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Build GF
|
- name: Build GF
|
||||||
run: |
|
run: |
|
||||||
cabal install --only-dependencies -fserver
|
cabal install --only-dependencies
|
||||||
cabal configure -fserver
|
cabal configure
|
||||||
cabal build
|
cabal build
|
||||||
copy dist\build\gf\gf.exe C:\tmp-dist
|
copy dist-newstyle/build/x86_64-windows/ghc-${{matrix.ghc}}/*/x/gf/build/gf/gf.exe C:/tmp-dist
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: gf-${{ github.event.release.tag_name }}-windows
|
name: gf-${{ github.event.release.tag_name }}-windows
|
||||||
path: C:\tmp-dist\*
|
path: C:\tmp-dist\*
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -50,7 +50,7 @@ html::
|
|||||||
# number to the top of debian/changelog.
|
# number to the top of debian/changelog.
|
||||||
# (Tested on Ubuntu 15.04. You need to install dpkg-dev & debhelper.)
|
# (Tested on Ubuntu 15.04. You need to install dpkg-dev & debhelper.)
|
||||||
deb:
|
deb:
|
||||||
dpkg-buildpackage -b -uc
|
dpkg-buildpackage -b -uc -d
|
||||||
|
|
||||||
# Make a macOS installer package
|
# Make a macOS installer package
|
||||||
pkg:
|
pkg:
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ set -x # print commands before executing them
|
|||||||
pushd src/runtime/c
|
pushd src/runtime/c
|
||||||
bash setup.sh configure --prefix="$prefix"
|
bash setup.sh configure --prefix="$prefix"
|
||||||
bash setup.sh build
|
bash setup.sh build
|
||||||
bash setup.sh install prefix="$prefix" # hack required for GF build on macOS
|
# bash setup.sh install prefix="$prefix" # hack required for GF build on macOS
|
||||||
bash setup.sh install prefix="$destdir$prefix"
|
bash setup.sh install prefix="$destdir$prefix"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ if which >/dev/null python; then
|
|||||||
pyver=$(ls "$destdir$prefix/lib" | sed -n 's/^python//p')
|
pyver=$(ls "$destdir$prefix/lib" | sed -n 's/^python//p')
|
||||||
pydest="$destdir/Library/Python/$pyver/site-packages"
|
pydest="$destdir/Library/Python/$pyver/site-packages"
|
||||||
mkdir -p "$pydest"
|
mkdir -p "$pydest"
|
||||||
ln "$destdir$prefix/lib/python$pyver/site-packages"/pgf* "$pydest"
|
ln "$destdir$prefix/lib/python$pyver/site-packages"/pgf*.so "$pydest"
|
||||||
fi
|
fi
|
||||||
popd
|
popd
|
||||||
else
|
else
|
||||||
|
|||||||
2
debian/control
vendored
2
debian/control
vendored
@@ -3,7 +3,7 @@ Section: devel
|
|||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Thomas Hallgren <hallgren@chalmers.se>
|
Maintainer: Thomas Hallgren <hallgren@chalmers.se>
|
||||||
Standards-Version: 3.9.2
|
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
|
Build-Depends: debhelper (>= 5), libghc-haskeline-dev, libghc-mtl-dev, libghc-json-dev, autoconf, automake, libtool-bin, python-dev-is-python3, java-sdk
|
||||||
Homepage: http://www.grammaticalframework.org/
|
Homepage: http://www.grammaticalframework.org/
|
||||||
|
|
||||||
Package: gf
|
Package: gf
|
||||||
|
|||||||
12
debian/rules
vendored
12
debian/rules
vendored
@@ -16,7 +16,7 @@ override_dh_shlibdeps:
|
|||||||
override_dh_auto_configure:
|
override_dh_auto_configure:
|
||||||
cd src/runtime/c && bash setup.sh configure --prefix=/usr
|
cd src/runtime/c && bash setup.sh configure --prefix=/usr
|
||||||
cd src/runtime/c && bash setup.sh build
|
cd src/runtime/c && bash setup.sh build
|
||||||
cabal v1-update
|
cabal update
|
||||||
cabal v1-install --only-dependencies
|
cabal v1-install --only-dependencies
|
||||||
cabal v1-configure --prefix=/usr -fserver -fc-runtime --extra-lib-dirs=$(CURDIR)/src/runtime/c/.libs --extra-include-dirs=$(CURDIR)/src/runtime/c
|
cabal v1-configure --prefix=/usr -fserver -fc-runtime --extra-lib-dirs=$(CURDIR)/src/runtime/c/.libs --extra-include-dirs=$(CURDIR)/src/runtime/c
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ SET_LDL=LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(CURDIR)/src/runtime/c/.libs
|
|||||||
|
|
||||||
override_dh_auto_build:
|
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/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
|
# cd src/runtime/java && make CFLAGS="-I$(CURDIR)/src/runtime/c -L$(CURDIR)/src/runtime/c/.libs" INSTALL_PATH=/usr
|
||||||
echo $(SET_LDL)
|
echo $(SET_LDL)
|
||||||
-$(SET_LDL) cabal v1-build
|
-$(SET_LDL) cabal v1-build
|
||||||
|
|
||||||
@@ -32,13 +32,15 @@ override_dh_auto_install:
|
|||||||
$(SET_LDL) cabal v1-copy --destdir=$(CURDIR)/debian/gf
|
$(SET_LDL) cabal v1-copy --destdir=$(CURDIR)/debian/gf
|
||||||
cd src/runtime/c && bash setup.sh copy prefix=$(CURDIR)/debian/gf/usr
|
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/python && python setup.py install --prefix=$(CURDIR)/debian/gf/usr
|
||||||
cd src/runtime/java && make INSTALL_PATH=$(CURDIR)/debian/gf/usr install
|
# cd src/runtime/java && make INSTALL_PATH=$(CURDIR)/debian/gf/usr install
|
||||||
D="`find debian/gf -name site-packages`" && [ -n "$$D" ] && cd $$D && cd .. && mv site-packages dist-packages
|
# D="`find debian/gf -name dist-packages`" && [ -n "$$D" ] && cd $$D && cd .. && mv dist-packages dist-packages
|
||||||
|
|
||||||
|
override_dh_usrlocal:
|
||||||
|
|
||||||
override_dh_auto_clean:
|
override_dh_auto_clean:
|
||||||
rm -fr dist/build
|
rm -fr dist/build
|
||||||
-cd src/runtime/python && rm -fr build
|
-cd src/runtime/python && rm -fr build
|
||||||
-cd src/runtime/java && make clean
|
# -cd src/runtime/java && make clean
|
||||||
-cd src/runtime/c && make clean
|
-cd src/runtime/c && make clean
|
||||||
|
|
||||||
override_dh_auto_test:
|
override_dh_auto_test:
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ Over 70 commits have been merged to gf-core since the release of GF 3.11 in July
|
|||||||
- Better error messages
|
- Better error messages
|
||||||
- Improvements to several GF shell commands
|
- Improvements to several GF shell commands
|
||||||
- Several bug fixes and performance improvements
|
- Several bug fixes and performance improvements
|
||||||
|
- temporarily drop support for Java bindings
|
||||||
|
|
||||||
## GF compiler and run-time library
|
## GF compiler and run-time library
|
||||||
- Syntactic sugar for table update: `table {cases ; vvv => t \! vvv}.t` can now be written as `t ** { cases }`
|
- Syntactic sugar for table update: `table {cases ; vvv => t \! vvv}.t` can now be written as `t ** { cases }`
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from distutils.core import setup, Extension
|
from setuptools import setup, Extension
|
||||||
import os
|
import os
|
||||||
|
|
||||||
includes = os.getenv('EXTRA_INCLUDE_DIRS','').split(':')
|
includes = os.getenv('EXTRA_INCLUDE_DIRS','').split(':')
|
||||||
|
|||||||
Reference in New Issue
Block a user