mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -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
|
||||
|
||||
env:
|
||||
LD_LIBRARY_PATH: /usr/local/lib
|
||||
|
||||
jobs:
|
||||
|
||||
ubuntu:
|
||||
name: Build on Ubuntu
|
||||
ubuntu-runtime:
|
||||
name: Runtime (Ubuntu)
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
# All these are already available in GitHub runner
|
||||
# - name: Install build tools
|
||||
# run: |
|
||||
# sudo apt-get update
|
||||
# sudo apt-get install -y \
|
||||
# autoconf \
|
||||
# automake \
|
||||
# libtool \
|
||||
# make \
|
||||
# g++
|
||||
|
||||
- name: Build C runtime
|
||||
- name: Build runtime
|
||||
working-directory: ./src/runtime/c
|
||||
run: |
|
||||
autoreconf -i
|
||||
@@ -30,37 +22,141 @@ jobs:
|
||||
make
|
||||
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
|
||||
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
|
||||
env:
|
||||
LD_LIBRARY_PATH: /usr/local/lib
|
||||
run: |
|
||||
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
|
||||
run: |
|
||||
python setup.py build
|
||||
sudo python setup.py install
|
||||
|
||||
- name: Run Python testsuite
|
||||
- name: Run testsuite
|
||||
working-directory: ./src/runtime/python
|
||||
env:
|
||||
LD_LIBRARY_PATH: /usr/local/lib
|
||||
run: |
|
||||
pip install 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
|
||||
env:
|
||||
LD_LIBRARY_PATH: /usr/local/lib
|
||||
run: |
|
||||
npm ci
|
||||
|
||||
- name: Run testsuite
|
||||
working-directory: ./src/runtime/javascript
|
||||
run: |
|
||||
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 command line tools: `xcode-select --install`
|
||||
- Required system packages (`brew install ...`):
|
||||
```
|
||||
autoconf
|
||||
automake
|
||||
libtool
|
||||
```
|
||||
|
||||
## 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
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
```
|
||||
The shared libraries are installed in `/usr/local/lib`.
|
||||
|
||||
## Using
|
||||
|
||||
- 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`
|
||||
|
||||
## 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