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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
name: Nightly Builds
on:
workflow_dispatch:
schedule:
# Daily at 3:14
- cron: '14 3 * * *'
jobs:
debian-packages:
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- name: Recursive Git Clone
uses: actions/checkout@v2
with:
submodules: recursive
- name: Update Repositories
run: sudo apt-get update
- name: Install Build Dependencies
run: >
sudo apt-get install -y
devscripts build-essential lintian debhelper dh-exec
autoconf automake libtool
libglib2.0-dev libncurses-dev libgtk-3-dev xvfb
groff-base
# NOTE: We need to configure the build directory only to generate distribute.mk.
- name: Configure Build
run: |
autoreconf -i
./configure
# NOTE: The debian package build rules already use xvfb-run to emulate an XServer
# when necessary since the PPA build servers might also be headless.
# NOTE: Packages are left in debian-temp/.
- name: Build Debian/Ubuntu Packages
run: ./distribute.mk debian-binary
# FIXME: For doing Windows builds, we need a few manually built packages
# (PDCurses, Glib...).
# Perhaps they can be uploaded to Sourceforge and simply downloaded here.
# Alternatively, we could manually prepare a Docker container image or
# even build them from scratch here.
# - name: Build Windows Bundle
# run: ./distribute.mk mingw-binary
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
# NOTE: There is no way to prevent Github from zipping the artifact.
- name: Archive Debian/Ubuntu Packages
uses: actions/upload-artifact@v2
with:
name: SciTECO nightly packages on ${{ steps.date.outputs.date }} (${{ matrix.os }}, ncurses and GTK+ 3)
path: debian-temp/*.deb
win32-curses:
runs-on: windows-latest
defaults:
run:
shell: bash.exe --login -eo pipefail "{0}"
env:
MSYSTEM: MINGW32
CHERE_INVOKING: 1
steps:
- name: Recursive Git Clone
uses: actions/checkout@v2
with:
submodules: recursive
- name: Set Up Shell
run: echo C:\msys64\usr\bin\ | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
shell: pwsh
- name: Install Build Dependencies
run: >
pacman -S --noconfirm --needed
base-devel mingw-w64-i686-toolchain
mingw-w64-i686-glib2 mingw-w64-i686-pdcurses
groff
- name: Configure Build
env:
PDCURSES_CFLAGS: -I/mingw32/include/pdcurses/
# The additional Windows libraries are for Win32a:
PDCURSES_LIBS: -lpdcurses -lgdi32 -lcomdlg32
LIBGLIB_LIBS: -lglib-2.0 -lintl -liconv -lpcre -lole32 -lws2_32
# FIXME: Once there is an --enable-lto, we should use that.
CFLAGS: -g -O3 -flto -DGLIB_STATIC_COMPILATION
CXXFLAGS: -g -O3 -flto
LDFLAGS: -flto
run: |
autoreconf -i
./configure --with-interface=pdcurses --enable-html-manual --enable-static-executables
- name: make
run: make -j 2
- run: make install-strip
# NOTE: The test suite must be run in verbose mode because if it fails
# we won't be able to analyze testsuite.log.
# - name: Run Test Suite
# run: make check TESTSUITEFLAGS="--verbose"
- name: Prepare Distribution Directory
run: |
mkdir temp-bin/
cp /mingw32/bin/{sciteco.exe,grosciteco.tes,tedoc.tes} temp-bin/
cp -r /mingw32/share/sciteco/{lib,*.teco_ini,*.tmac} temp-bin/
cp /mingw32/share/sciteco/sample.teco_ini temp-bin/.teco_ini
cp -r /mingw32/share/doc/sciteco/* temp-bin/
cp COPYING ChangeLog temp-bin/
cp /mingw32/bin/gspawn-win32-helper-console.exe temp-bin/
# FIXME: Even though MSYS provides working statically-linked
# Glib libraries, the g_spawn() helpers still depend on the DLL.
# This could perhaps be avoided by downloading our own self-built
# executable from somewhere.
cp /mingw32/bin/libglib-2.0-0.dll temp-bin/
- name: Get Current Date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Archive Windows Distribution (PDCurses)
uses: actions/upload-artifact@v2
with:
name: SciTECO nightly packages on ${{ steps.date.outputs.date }} (win32, PDCurses)
path: temp-bin/*
|