mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-19 01:39:32 -06:00
80 lines
1.7 KiB
YAML
80 lines
1.7 KiB
YAML
name: Build Windows Package
|
|
|
|
on:
|
|
push: # testing until merged into master
|
|
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 MSYS2
|
|
uses: msys2/setup-msys2@v2
|
|
with:
|
|
install: >-
|
|
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
|
|
|
|
- name: Prepare dist folder
|
|
shell: msys2 {0}
|
|
run: |
|
|
mkdir /c/tmp-dist
|
|
|
|
- name: Build C runtime
|
|
shell: msys2 {0}
|
|
run: |
|
|
cd src/runtime/c
|
|
autoreconf -i
|
|
./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: C:\tmp-dist\*
|
|
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
|
|
cabal configure -fserver
|
|
cabal build
|
|
|
|
- name: Upload exe to artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: gf-${{ github.sha }}-windows
|
|
path: dist\build\gf\gf.exe
|
|
if-no-files-found: error
|