mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
Merge branch 'majestic' of github.com:GrammaticalFramework/gf-core into majestic
This commit is contained in:
150
.github/workflows/build-majestic.yml
vendored
150
.github/workflows/build-majestic.yml
vendored
@@ -2,27 +2,19 @@ name: Build majestic runtime
|
|||||||
|
|
||||||
on: push
|
on: push
|
||||||
|
|
||||||
|
env:
|
||||||
|
LD_LIBRARY_PATH: /usr/local/lib
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
ubuntu:
|
ubuntu-runtime:
|
||||||
name: Build on Ubuntu
|
name: Runtime (Ubuntu)
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
# All these are already available in GitHub runner
|
- name: Build runtime
|
||||||
# - name: Install build tools
|
|
||||||
# run: |
|
|
||||||
# sudo apt-get update
|
|
||||||
# sudo apt-get install -y \
|
|
||||||
# autoconf \
|
|
||||||
# automake \
|
|
||||||
# libtool \
|
|
||||||
# make \
|
|
||||||
# g++
|
|
||||||
|
|
||||||
- name: Build C runtime
|
|
||||||
working-directory: ./src/runtime/c
|
working-directory: ./src/runtime/c
|
||||||
run: |
|
run: |
|
||||||
autoreconf -i
|
autoreconf -i
|
||||||
@@ -30,37 +22,141 @@ jobs:
|
|||||||
make
|
make
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@master
|
||||||
|
with:
|
||||||
|
name: libpgf-ubuntu
|
||||||
|
path: |
|
||||||
|
/usr/local/lib/libpgf*
|
||||||
|
/usr/local/include/pgf
|
||||||
|
|
||||||
|
ubuntu-haskell:
|
||||||
|
name: Haskell (Ubuntu)
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: ubuntu-runtime
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Download artifact
|
||||||
|
uses: actions/download-artifact@master
|
||||||
|
with:
|
||||||
|
name: libpgf-ubuntu
|
||||||
|
- run: |
|
||||||
|
sudo mv lib/* /usr/local/lib/
|
||||||
|
sudo mv include/* /usr/local/include/
|
||||||
|
|
||||||
- name: Setup Haskell
|
- name: Setup Haskell
|
||||||
uses: haskell/actions/setup@v1
|
uses: haskell/actions/setup@v1
|
||||||
# with:
|
|
||||||
# ghc-version: '8.6'
|
|
||||||
# cabal-version: '2.4.1.0'
|
|
||||||
|
|
||||||
- name: Run Haskell testsuite
|
- name: Build & run testsuite
|
||||||
working-directory: ./src/runtime/haskell
|
working-directory: ./src/runtime/haskell
|
||||||
env:
|
|
||||||
LD_LIBRARY_PATH: /usr/local/lib
|
|
||||||
run: |
|
run: |
|
||||||
cabal test --extra-lib-dirs=/usr/local/lib
|
cabal test --extra-lib-dirs=/usr/local/lib
|
||||||
|
|
||||||
- name: Install Python bindings
|
ubuntu-python:
|
||||||
|
name: Python (Ubuntu)
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: ubuntu-runtime
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Download artifact
|
||||||
|
uses: actions/download-artifact@master
|
||||||
|
with:
|
||||||
|
name: libpgf-ubuntu
|
||||||
|
- run: |
|
||||||
|
sudo mv lib/* /usr/local/lib/
|
||||||
|
sudo mv include/* /usr/local/include/
|
||||||
|
|
||||||
|
- name: Install bindings
|
||||||
working-directory: ./src/runtime/python
|
working-directory: ./src/runtime/python
|
||||||
run: |
|
run: |
|
||||||
python setup.py build
|
python setup.py build
|
||||||
sudo python setup.py install
|
sudo python setup.py install
|
||||||
|
|
||||||
- name: Run Python testsuite
|
- name: Run testsuite
|
||||||
working-directory: ./src/runtime/python
|
working-directory: ./src/runtime/python
|
||||||
env:
|
|
||||||
LD_LIBRARY_PATH: /usr/local/lib
|
|
||||||
run: |
|
run: |
|
||||||
pip install pytest
|
pip install pytest
|
||||||
pytest
|
pytest
|
||||||
|
|
||||||
- name: Run JavaScript testsuite
|
ubuntu-javascript:
|
||||||
|
name: JavaScript (Ubuntu)
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: ubuntu-runtime
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Download artifact
|
||||||
|
uses: actions/download-artifact@master
|
||||||
|
with:
|
||||||
|
name: libpgf-ubuntu
|
||||||
|
- run: |
|
||||||
|
sudo mv lib/* /usr/local/lib/
|
||||||
|
sudo mv include/* /usr/local/include/
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
working-directory: ./src/runtime/javascript
|
working-directory: ./src/runtime/javascript
|
||||||
env:
|
|
||||||
LD_LIBRARY_PATH: /usr/local/lib
|
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
npm ci
|
||||||
|
|
||||||
|
- name: Run testsuite
|
||||||
|
working-directory: ./src/runtime/javascript
|
||||||
|
run: |
|
||||||
npm run test
|
npm run test
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
macos-runtime:
|
||||||
|
name: Runtime (macOS)
|
||||||
|
runs-on: macOS-11
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install build tools
|
||||||
|
run: |
|
||||||
|
brew install \
|
||||||
|
autoconf \
|
||||||
|
automake \
|
||||||
|
libtool \
|
||||||
|
|
||||||
|
- name: Build runtime
|
||||||
|
working-directory: ./src/runtime/c
|
||||||
|
run: |
|
||||||
|
glibtoolize
|
||||||
|
autoreconf -i
|
||||||
|
./configure
|
||||||
|
make
|
||||||
|
sudo make install
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@master
|
||||||
|
with:
|
||||||
|
name: libpgf-macos
|
||||||
|
path: |
|
||||||
|
/usr/local/lib/libpgf*
|
||||||
|
/usr/local/include/pgf
|
||||||
|
|
||||||
|
macos-haskell:
|
||||||
|
name: Haskell (macOS)
|
||||||
|
runs-on: macOS-11
|
||||||
|
needs: macos-runtime
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Download artifact
|
||||||
|
uses: actions/download-artifact@master
|
||||||
|
with:
|
||||||
|
name: libpgf-macos
|
||||||
|
- run: |
|
||||||
|
sudo mv lib/* /usr/local/lib/
|
||||||
|
sudo mv include/* /usr/local/include/
|
||||||
|
|
||||||
|
- name: Setup Haskell
|
||||||
|
uses: haskell/actions/setup@v1
|
||||||
|
|
||||||
|
- name: Build & run testsuite
|
||||||
|
working-directory: ./src/runtime/haskell
|
||||||
|
run: |
|
||||||
|
cabal test --extra-lib-dirs=/usr/local/lib
|
||||||
|
|||||||
@@ -17,18 +17,47 @@ g++
|
|||||||
|
|
||||||
- Install XCode from App Store
|
- Install XCode from App Store
|
||||||
- Install XCode command line tools: `xcode-select --install`
|
- Install XCode command line tools: `xcode-select --install`
|
||||||
|
- Required system packages (`brew install ...`):
|
||||||
|
```
|
||||||
|
autoconf
|
||||||
|
automake
|
||||||
|
libtool
|
||||||
|
```
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Installing the runtime (puts libraries in `/usr/local/lib`):
|
**Note for macOS**: you should first run `glibtoolize`, followed by the commands below.
|
||||||
|
|
||||||
```
|
```
|
||||||
autoreconf -i
|
autoreconf -i
|
||||||
./configure
|
./configure
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
```
|
```
|
||||||
|
The shared libraries are installed in `/usr/local/lib`.
|
||||||
|
|
||||||
## Using
|
## Using
|
||||||
|
|
||||||
- Compiling GF with this runtime will require flag `--extra-lib-dirs=/usr/local/lib`.
|
- Compiling GF with this runtime will require flag `--extra-lib-dirs=/usr/local/lib`.
|
||||||
- Running GF with this runtime will require environment variable `LD_LIBRARY_PATH=/usr/local/lib`
|
- Running GF with this runtime will require environment variable `LD_LIBRARY_PATH=/usr/local/lib`
|
||||||
|
|
||||||
|
## Uninstalling
|
||||||
|
|
||||||
|
To remove the _old_ C runtime from your system, do:
|
||||||
|
```
|
||||||
|
rm /usr/local/lib/libpgf.*
|
||||||
|
rm /usr/local/lib/libgu.*
|
||||||
|
rm /usr/local/lib/libsg.*
|
||||||
|
rm -rf /usr/local/include/pgf
|
||||||
|
```
|
||||||
|
|
||||||
|
To remove _this_ version of the runtime from your system, do:
|
||||||
|
```
|
||||||
|
rm /usr/local/lib/libpgf.*
|
||||||
|
rm -rf /usr/local/include/pgf
|
||||||
|
```
|
||||||
|
|
||||||
|
To clean all generated build files from this directory, use:
|
||||||
|
```
|
||||||
|
git clean -Xdf
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user