-
Notifications
You must be signed in to change notification settings - Fork 5
74 lines (66 loc) · 4.56 KB
/
windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: windows build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
repository_dispatch:
types: [Windows]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '11'
check-latest: true
- name: install packages
run: C:\msys64\usr\bin\bash -lc "PATH+=:/mingw64/bin ; pacman --noconfirm -S base-devel mingw-w64-x86_64-gcc mingw-w64-x86_64-autotools mingw-w64-x86_64-gmp p7zip mingw-w64-x86_64-expat base-devel libtool"
- name: get libDDD
run: C:\msys64\usr\bin\bash -lc "PATH+=:/mingw64/bin ; cd /D/a/libITS/libITS ; wget --progress=dot:mega https://github.com/lip6/libDDD/raw/Windows/windows.zip ; 7z x windows.zip ; rm windows.zip"
- name: handle ANTLR
run: C:\msys64\usr\bin\bash -lc "PATH+=:/mingw64/bin ; cd /D/a/libITS/libITS ; ./antlr.sh ;"
- name: build ANTLR grammar
run: cd its\gal\parser ; java -jar ../../../usr/local/lib/antlr-3.4-complete.jar exprParser.g
- name: configure and make
run: C:\msys64\usr\bin\bash -lc "PATH+=:/mingw64/bin ; cd /D/a/libITS/libITS ; (autoreconf -vfi && ./configure --prefix=/D/a/libITS/libITS/usr/local/ CPPFLAGS=-I/D/a/libITS/libITS/usr/local/include LDFLAGS=-L/D/a/libITS/libITS/usr/local/lib --with-antlrc=/D/a/libITS/libITS/usr/local/ --with-antlrjar=/D/a/libITS/libITS/usr/local/lib/antlr-3.4-complete.jar --enable-nolto --enable-mingw-native && make && make install) || cat config.log"
- name: package zip
run: C:\msys64\usr\bin\bash -lc "PATH+=:/mingw64/bin ; cd /D/a/libITS/libITS ; mkdir site ; strip -s bin/its-reach.exe ; cp bin/its-reach.exe site/; 7z a -tzip windows.zip usr/ ; mv windows.zip site/"
- name: configure and make
run: C:\msys64\usr\bin\bash -lc "PATH+=:/mingw64/bin ; cd /D/a/libITS/libITS/CTL ; (autoreconf -vfi && ./configure --prefix=/D/a/libITS/libITS/usr/local/ CPPFLAGS=-I/D/a/libITS/libITS/usr/local/include LDFLAGS=-L/D/a/libITS/libITS/usr/local/lib --with-antlrc=/D/a/libITS/libITS/usr/local/ --enable-nolto --enable-mingw-native && make && make install) || cat config.log ; cat config.log"
- name: package zip
run: C:\msys64\usr\bin\bash -lc "PATH+=:/mingw64/bin ; cd /D/a/libITS/libITS/CTL ; strip -s bin/its-ctl.exe ; cp bin/its-ctl.exe ../site/ ; "
- name: get Spot
run: C:\msys64\usr\bin\bash -lc "PATH+=:/mingw64/bin ; cd /D/a/libITS/libITS ; wget --progress=dot:mega https://github.com/yanntm/Spot-BinaryBuilds/raw/Windows/spot_windows.tar.gz ; tar xzf spot_windows.tar.gz ; cd usr/local/lib ; sed -i 's#Spot-BinaryBuilds/Spot-BinaryBuilds/install_dir#libITS/libITS#g' *.la pkgconfig/* ; cd ../../.. ; rm spot_windows.tar.gz"
- name: configure and make
run: C:\msys64\usr\bin\bash -lc "PATH+=:/mingw64/bin ; cd /D/a/libITS/libITS/LTL ; (autoreconf -vfi && ./configure --prefix=/D/a/libITS/libITS/usr/local/ CPPFLAGS=-I/D/a/libITS/libITS/usr/local/include LDFLAGS=-L/D/a/libITS/libITS/usr/local/lib --with-antlrc=/D/a/libITS/libITS/usr/local/ --enable-nolto --enable-mingw-native && make && make install) || cat config.log"
- name: package zip
run: C:\msys64\usr\bin\bash -lc "PATH+=:/mingw64/bin ; cd /D/a/libITS/libITS/LTL ; strip -s src/its-ltl.exe ; cp src/its-ltl.exe ../site/ ; "
- name: Upload Artifacts 🔺 # The project is then uploaded as an artifact named 'site'.
uses: actions/upload-artifact@v3
with:
name: site
path: site/
deploy:
needs: [build] # The second job must depend on the first one to complete before running, and uses ubuntu-latest instead of windows.
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Download Artifacts # The built project is downloaded into the 'site' folder.
uses: actions/download-artifact@v3
with:
name: site
- name: move to website
run: ls -lah ; mkdir -p windows ; cp windows.zip windows/ ; cp its-reach.exe windows ; cp its-ctl.exe windows/ ; cp its-ltl.exe windows/ ; ls -lah windows/
- name: Deploy
uses: JamesIves/[email protected]
with:
branch: Windows
folder: windows/ # The deployment folder should match the name of the artifact. Even though our project builds into the 'build' folder the artifact name of 'site' must be placed here.
clean: true # Automatically remove deleted files from the deploy branch
single-commit: true