aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/continuous-integration.yml
blob: 1a55ba65ecf97ac94d91e22ed4dfcfcd9046dcdf (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
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
name: Continuous Integration

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build-and-test:
    strategy:
      matrix:
        os: [ubuntu-18.04, ubuntu-20.04]
        compiler: ['CC=gcc CXX=g++', 'CC=clang CXX=clang++']

    # NOTE: The virtual environments already contain both GCC and Clang
    runs-on: ${{ matrix.os }}

    steps:

    - name: Recursive Git Clone
      uses: actions/checkout@v2
      with:
        submodules: recursive

    - name: Install Build Dependencies
      run: >
        sudo apt-get install -y
        build-essential
        autoconf automake libtool
        libglib2.0-dev libncurses-dev
        groff doxygen

    - name: Configure Build
      run: |
        autoreconf -i
        ./configure --with-interface=ncurses --enable-html-manual ${{ matrix.compiler }}

    - run: make
    - run: sudo make install
    - name: Run Test Suite
      run: make check
    - name: Build Developer Documentation
      run: cd doc && make devdoc
    # FIXME: Will try to perform an out-of-tree build which will not
    # work without manual intervention due to Scintilla.
#   - run: make distcheck
    - name: Build Source Tarball
      run: make dist

  # This is a separate job since we don't need to build Debian packages
  # using Clang and there is no need to run "make all".
  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: Install Build Dependencies
      run: >
        sudo apt-get install -y
        devscripts build-essential lintian debhelper
        autoconf automake libtool
        libglib2.0-dev libncurses-dev
        groff-base

    # NOTE: We need to configure the build directory only to generate distribute.mk.
    - name: Configure Build
      run: |
        autoreconf -i
        ./configure

    # NOTE: Packages are left in debian-temp/.
    - name: Build Debian Package
      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.
#   - name: Build Windows Bundle
#     run: ./distribute.mk mingw-binary

    # FIXME: We need to upload a single file without a wildcard since
    # it will otherwise be put into a ZIP.
    # Best let distribute.mk create a symlink so we don't have to include
    # the version here.
    - name: Archive Debian Package (ncurses)
      uses: actions/upload-artifact@v2
      with:
        name: ${{ matrix.os }} package (ncurses)
        path: debian-temp/sciteco-curses_2.0.0-0_amd64.deb