aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/nightly.yml
blob: 67c7233cb30d0dd739947df041832143a8dbe8a4 (plain)
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
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 gob2 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