@@ -2,7 +2,7 @@ name: Build Binary Packages
22
33on :
44 workflow_dispatch :
5- release :
5+ release :
66 types : ["created"]
77
88jobs :
1313 name : Build Ubuntu package
1414 strategy :
1515 matrix :
16- os :
17- - ubuntu-20.04
18- - ubuntu-22 .04
16+ ghc : ["9.6"]
17+ cabal : ["3.10"]
18+ os : [" ubuntu-24 .04"]
1919
2020 runs-on : ${{ matrix.os }}
2121
@@ -25,12 +25,13 @@ jobs:
2525 # Note: `haskell-platform` is listed as requirement in debian/control,
2626 # which is why it's installed using apt instead of the Setup Haskell action.
2727
28- # - name: Setup Haskell
29- # uses: actions/setup-haskell@v1
30- # id: setup-haskell-cabal
31- # with:
32- # ghc-version: ${{ matrix.ghc }}
33- # cabal-version: ${{ matrix.cabal }}
28+ - name : Setup Haskell
29+ uses : haskell-actions/setup@v2
30+ id : setup-haskell-cabal
31+ with :
32+ ghc-version : ${{ matrix.ghc }}
33+ cabal-version : ${{ matrix.cabal }}
34+ if : matrix.os == 'ubuntu-24.04'
3435
3536 - name : Install build tools
3637 run : |
@@ -39,22 +40,23 @@ jobs:
3940 make \
4041 dpkg-dev \
4142 debhelper \
42- haskell-platform \
4343 libghc-json-dev \
44- python-dev \
4544 default-jdk \
46- libtool-bin
47-
45+ python-dev-is-python3 \
46+ libtool-bin
47+ cabal install alex happy
48+
4849 - name : Build package
4950 run : |
51+ export PYTHONPATH="/home/runner/work/gf-core/gf-core/debian/gf/usr/local/lib/python3.12/dist-packages/"
5052 make deb
5153
5254 - name : Copy package
5355 run : |
5456 cp ../gf_*.deb dist/
5557
5658 - name : Upload artifact
57- uses : actions/upload-artifact@v2
59+ uses : actions/upload-artifact@v4
5860 with :
5961 name : gf-${{ github.event.release.tag_name }}-${{ matrix.os }}.deb
6062 path : dist/gf_*.deb
@@ -79,16 +81,16 @@ jobs:
7981 name : Build macOS package
8082 strategy :
8183 matrix :
82- ghc : ["8.6.5 "]
83- cabal : ["2.4 "]
84- os : ["macos-10.15 "]
84+ ghc : ["9.6 "]
85+ cabal : ["3.10 "]
86+ os : ["macos-latest", "macos-13 "]
8587 runs-on : ${{ matrix.os }}
8688
8789 steps :
8890 - uses : actions/checkout@v2
8991
9092 - name : Setup Haskell
91- uses : actions/setup-haskell@v1
93+ uses : haskell- actions/setup@v2
9294 id : setup-haskell-cabal
9395 with :
9496 ghc-version : ${{ matrix.ghc }}
9799 - name : Install build tools
98100 run : |
99101 brew install \
100- automake
102+ automake \
103+ libtool
101104 cabal v1-install alex happy
105+ pip install setuptools
102106
103107 - name : Build package
104108 run : |
@@ -107,12 +111,12 @@ jobs:
107111 make pkg
108112
109113 - name : Upload artifact
110- uses : actions/upload-artifact@v2
114+ uses : actions/upload-artifact@v4
111115 with :
112- name : gf-${{ github.event.release.tag_name }}-macos
116+ name : gf-${{ github.event.release.tag_name }}-${{ matrix.os }}
113117 path : dist/gf-*.pkg
114118 if-no-files-found : error
115-
119+
116120 - name : Rename package
117121 run : |
118122 mv dist/gf-*.pkg dist/gf-${{ github.event.release.tag_name }}-macos.pkg
@@ -132,9 +136,9 @@ jobs:
132136 name : Build Windows package
133137 strategy :
134138 matrix :
135- ghc : ["8 .6.5 "]
136- cabal : ["2.4 "]
137- os : ["windows-2019 "]
139+ ghc : ["9 .6.7 "]
140+ cabal : ["3.10 "]
141+ os : ["windows-2022 "]
138142 runs-on : ${{ matrix.os }}
139143
140144 steps :
@@ -147,6 +151,7 @@ jobs:
147151 base-devel
148152 gcc
149153 python-devel
154+ autotools
150155
151156 - name : Prepare dist folder
152157 shell : msys2 {0}
@@ -171,7 +176,8 @@ jobs:
171176 - name : Build Java bindings
172177 shell : msys2 {0}
173178 run : |
174- export JDKPATH=/c/hostedtoolcache/windows/Java_Adopt_jdk/8.0.292-10/x64
179+ echo $JAVA_HOME_8_X64
180+ export JDKPATH="$(cygpath -u "${JAVA_HOME_8_X64}")"
175181 export PATH="${PATH}:${JDKPATH}/bin"
176182 cd src/runtime/java
177183 make \
@@ -180,6 +186,9 @@ jobs:
180186 make install
181187 cp .libs/msys-jpgf-0.dll /c/tmp-dist/java/jpgf.dll
182188 cp jpgf.jar /c/tmp-dist/java
189+ if : false
190+
191+ # - uses: actions/setup-python@v5
183192
184193 - name : Build Python bindings
185194 shell : msys2 {0}
@@ -188,12 +197,13 @@ jobs:
188197 EXTRA_LIB_DIRS : /mingw64/lib
189198 run : |
190199 cd src/runtime/python
200+ pacman --noconfirm -S python-setuptools
191201 python setup.py build
192202 python setup.py install
193- cp /usr/lib/python3.9 /site-packages/pgf* /c/tmp-dist/python
203+ cp -r /usr/lib/python3.12 /site-packages/pgf* /c/tmp-dist/python
194204
195205 - name : Setup Haskell
196- uses : actions/setup-haskell@v1
206+ uses : haskell- actions/setup@v2
197207 id : setup-haskell-cabal
198208 with :
199209 ghc-version : ${{ matrix.ghc }}
@@ -205,13 +215,13 @@ jobs:
205215
206216 - name : Build GF
207217 run : |
208- cabal install --only-dependencies -fserver
209- cabal configure -fserver
218+ cabal install --only-dependencies
219+ cabal configure
210220 cabal build
211- copy dist\ build\gf\gf .exe C:\ tmp-dist
221+ copy dist-newstyle/ build/x86_64-windows/ghc-${{matrix.ghc}}/*/x/gf/build/gf/gf .exe C:/ tmp-dist
212222
213223 - name : Upload artifact
214- uses : actions/upload-artifact@v2
224+ uses : actions/upload-artifact@v4
215225 with :
216226 name : gf-${{ github.event.release.tag_name }}-windows
217227 path : C:\tmp-dist\*
0 commit comments