aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml147
-rw-r--r--.github/workflows/irc.yml41
-rw-r--r--.github/workflows/nightly.yml338
3 files changed, 0 insertions, 526 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
deleted file mode 100644
index 508931c..0000000
--- a/.github/workflows/ci.yml
+++ /dev/null
@@ -1,147 +0,0 @@
-name: Continuous Integration
-
-on: [push, pull_request]
-
-jobs:
- ubuntu:
- strategy:
- matrix:
- os: [ubuntu-22.04, ubuntu-24.04]
- compiler: ['CC=gcc CXX=g++', 'CC=clang CXX=clang++']
- interface: [ncurses, gtk]
-
- # NOTE: The virtual environments already contain both GCC and Clang
- runs-on: ${{ matrix.os }}
-
- steps:
-
- - name: Git Clone
- uses: actions/checkout@v4.1.6
- with:
- submodules: true
-
- - name: Update Repositories
- run: sudo apt-get update
- - name: Install Build Dependencies
- run: >
- sudo apt-get install -y
- build-essential
- autoconf automake libtool
- libglib2.0-dev libncurses-dev libgtk-3-dev xvfb
- groff doxygen
-
- - name: Configure Build
- env:
- # Enable Adress Sanitizer only on ncurses.
- # Gtk produces a lot of false negatives.
- # This will improve the test suite quality, even without Valgrind.
- CFLAGS: ${{ matrix.interface == 'ncurses' && '-fsanitize=address -fno-omit-frame-pointer' || ' ' }}
- CXXFLAGS: ${{ matrix.interface == 'ncurses' && '-fsanitize=address -fno-omit-frame-pointer' || ' ' }}
- MALLOC_REPLACEMENT: ${{ matrix.interface == 'ncurses' && 'no' || 'check' }}
- run: |
- autoreconf -i
- ./configure --with-interface=${{ matrix.interface }} --enable-debug --enable-html-docs \
- --enable-malloc-replacement=$MALLOC_REPLACEMENT ${{ matrix.compiler }}
-
- # NOTE: xvfb-run emulates an XServer and is required when building
- # Gtk versions (since SciTECO calls itself during the build).
- - name: make
- run: xvfb-run -a make
- - name: make install
- run: sudo xvfb-run -a make install
- # 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: xvfb-run -a make check TESTSUITEFLAGS="--verbose --color=never"
- - name: Build Developer Documentation
- run: cd doc && make devdoc
- - name: make distcheck
- run: xvfb-run -a make distcheck
- - name: Build Source Tarball
- run: make dist
-
- macos:
- runs-on: macos-latest
-
- steps:
-
- - name: Git Clone
- uses: actions/checkout@v4.1.6
- with:
- submodules: true
-
- # NOTE: macOS already ships with ncurses and
- # XCode already comes with the autotools.
- - name: Install Build Dependencies
- run: brew install autoconf automake libtool glib groff doxygen
- - name: Configure Build
- env:
- # Make sure we don't pick up GCC by accident.
- CC: clang
- CXX: clang++
- run: |
- autoreconf -i
- ./configure --with-interface=ncurses --enable-debug --enable-html-docs
-
- - run: make
- - run: sudo make install
- # 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 --color=never"
- - name: Build Developer Documentation
- run: cd doc && make devdoc
- - run: make distcheck
- - name: Build Source Tarball
- run: make dist
-
- win64:
- runs-on: windows-latest
-
- defaults:
- run:
- shell: bash.exe --login -eo pipefail "{0}"
- env:
- MSYSTEM: MINGW64
- CHERE_INVOKING: 1
-
- steps:
-
- - name: Git Clone
- uses: actions/checkout@v4.1.6
- with:
- submodules: true
-
- - 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-x86_64-autotools mingw-w64-x86_64-toolchain
- mingw-w64-x86_64-glib2 mingw-w64-x86_64-pdcurses
- groff mingw-w64-x86_64-doxygen
-
- - name: Configure Build
- env:
- CURSES_CFLAGS: -I/mingw64/include/pdcurses/
- run: |
- autoreconf -i
- ./configure --with-interface=pdcurses-gui --enable-debug --enable-html-docs
-
- - run: make
- - run: make install
- # 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 --color=never"
- - name: Build Developer Documentation
- run: cd doc && make devdoc
- - name: make distcheck
- env:
- DISTCHECK_CONFIGURE_FLAGS: --with-interface=pdcurses-gui
- CURSES_CFLAGS: -I/mingw64/include/pdcurses/
- run: make distcheck
- - name: Build Source Tarball
- run: make dist
diff --git a/.github/workflows/irc.yml b/.github/workflows/irc.yml
deleted file mode 100644
index f96616f..0000000
--- a/.github/workflows/irc.yml
+++ /dev/null
@@ -1,41 +0,0 @@
-# After every push with successful CI,
-# post the commits since the last successful CI into the IRC channel.
-name: IRC Post
-
-on:
- workflow_run:
- workflows: ['Continuous Integration']
- types: [completed]
- branches: master
-
-jobs:
- irc:
- runs-on: ubuntu-latest
- if: ${{ github.event.workflow_run.conclusion == 'success' }}
- steps:
- - name: Git Clone
- uses: actions/checkout@v4.1.6
- with:
- fetch-depth: 0
- - name: Get log
- id: get_log
- env:
- GH_TOKEN: ${{ github.token }}
- run: |
- # Get commit of the previous successful CI run
- COMMIT="`gh run list --workflow="ci.yml" --limit=2 --status=success --json headSha -q '.[1].headSha'`"
- {
- echo 'LOG<<EOF'
- git log --pretty="format:%h %s" --reverse $COMMIT..HEAD
- echo EOF
- } >> "$GITHUB_OUTPUT"
- - name: Post IRC message
- uses: rectalogic/notify-irc@v1
- with:
- channel: "#sciteco"
- server: "irc.libera.chat"
- nickname: git-bot
- # NOTE: There is also ${{ github.event.ref }} ${{ join(github.event.commits.*.message) }}
- # but it probably doesn't give us the commits since the last succesful one, but simply everything
- # belonging to the push.
- message: ${{ steps.get_log.outputs.LOG }}
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
deleted file mode 100644
index 2e494e4..0000000
--- a/.github/workflows/nightly.yml
+++ /dev/null
@@ -1,338 +0,0 @@
-name: Nightly Builds
-
-on:
- workflow_dispatch:
- schedule:
- # Daily at 3:14
- - cron: '14 3 * * *'
-
-jobs:
- # FIXME: AppImages can theoretically also be built on OBS.
- # Unfortunately it only works with packages from openSUSE 15.6.
- # Also, it's not trivial to build multiple AppImages on OBS.
- appimages:
- runs-on: ubuntu-22.04
-
- steps:
-
- - name: Git Clone
- uses: actions/checkout@v4.1.6
-
- - name: Update Repositories
- run: sudo apt-get update
-
- - name: Build AppImages
- env:
- GH_TOKEN: ${{ github.token }}
- run: |
- sudo apt-get install -y libfuse2 imagemagick wget
- cd AppImage
- gh release download -R AppImageCommunity/pkg2appimage -O pkg2appimage.AppImage \
- -p 'pkg2appimage-*-x86_64.AppImage' continuous
- chmod +x pkg2appimage.AppImage
- ./pkg2appimage.AppImage curses.yml
- mv out/*.AppImage ../sciteco-curses_nightly_x86_64.AppImage
- ./pkg2appimage.AppImage gtk.yml
- mv out/*.AppImage ../sciteco-gtk_nightly_x86_64.AppImage
- chmod a+x *.AppImage
-
- - name: Archive AppImages
- uses: pyTooling/Actions/releaser@v1.0.5
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- tag: nightly
- files: ./*.AppImage
-
- macos:
- runs-on: macos-13
-
- steps:
-
- - name: Git Clone
- uses: actions/checkout@v4.1.6
- with:
- submodules: true
-
- # NOTE: macOS already ships with ncurses and groff.
- # The system libncurses has turned out to be buggy, though (keypad() does not work).
- # However, it does work on real Mac OS systems, I was told.
- # Linking in our own ncurses should also be more portable in case
- # the system libncurses ABI breaks.
- # However, Homebrew installs ncurses as a keg and it will refer to a
- # non-standard $TERMINFO. This could be worked around.
- # The macOS Groff version appears to be outdated.
- - name: Install Build Dependencies
- run: brew install autoconf automake libtool glib groff dylibbundler
- # Required by pyTooling/Actions/releaser
- - name: Set up Python
- uses: actions/setup-python@v4.3.0
- with:
- python-version: '3.10'
- # FIXME: It would be nice to build universal arm64/x86_64 binaries,
- # this apparently requires two separate build runs and a following merge
- # using `lipo -create`. In this case we could just as well build two
- # separate packages.
- - name: Configure Build
- env:
- # Make sure we don't pick up GCC by accident.
- CC: clang
- CXX: clang++
- # FIXME: Once there is an --enable-lto, we should use that.
- CFLAGS: -O3 -flto
- CXXFLAGS: -O3 -flto
- LDFLAGS: -flto
- # Uncomment if you want to build against the Homebrew-installed libncurses.
- #PKG_CONFIG_PATH: /usr/local/opt/ncurses/lib/pkgconfig
- # NOTE: This will not result in a fully statically-linked binary,
- # but the more we get rid off, the better.
- # NOTE: Making the binary relocatable means it can be installed into non-root directories
- # with `installer -pkg -target`.
- run: |
- autoreconf -i
- ./configure --with-interface=ncurses --enable-static-executables --enable-html-docs \
- --with-scitecodatadir=../share/sciteco
-
- - name: make
- run: make -j 2
- # 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 --color=never"
-
- - name: Package
- run: |
- make install-strip DESTDIR=`pwd`/temp-install
- # There are libraries we cannot link against statically.
- # We ship them in /usr/local/lib/sciteco so as not to cause collisions with system
- # libraries or libraries installed via Homebrew.
- # System libraries are considered to have stable ABIs and
- # are not currently bundled.
- # FIXME: Is this really true for libc++?
- dylibbundler -b -x temp-install/usr/local/bin/sciteco \
- -cd -d temp-install/usr/local/lib/sciteco -p @executable_path/../lib/sciteco
- # FIXME: Should we encode the Git commit into the package version?
- # Unfortunately, I cannot find detailed information on how Mac OS
- # interpretes these version strings.
- VERSION=`sed -nE 's/#define PACKAGE_VERSION "(.*)"/\1/p' config.h`
- pkgbuild --identifier net.sf.sciteco.pkg --version $VERSION \
- --root temp-install --install-location / \
- sciteco-curses_nightly_macos_x86_64.pkg
- - name: Archive Mac OS Distribution (ncurses)
- uses: pyTooling/Actions/releaser/composite@v1.0.5
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- tag: nightly
- files: ./*.pkg
-
- # The website is published on Mac OS only because we cannot tweak the
- # ./configure flags on Ubuntu where Debian packages are built.
- # FIXME: This could be done without a gh-pages branch, see
- # https://github.com/actions/starter-workflows/blob/main/pages/static.yml
- # This however should be in its own workflow and we'd have to rebuild
- # SciTECO and everything.
- # FIXME: Also build cheat-sheet.pdf automatically?
- - run: make install
- - name: Install lowdown (Markdown processor)
- run: brew install lowdown
- - name: Generate website
- run: cd www && sciteco -m build.tes ..
- - name: Publish Website
- run: |
- cd www
- touch .nojekyll
- git init
- cp ../.git/config ./.git/config
- git add .nojekyll *.html
- git config --local user.email "Website@GitHubActions"
- git config --local user.name "GitHub Actions"
- git commit -a -m "update ${{ github.sha }}"
- git push -u origin +HEAD:gh-pages
-
- win64-curses:
- runs-on: windows-2022
-
- defaults:
- run:
- shell: bash.exe --login -eo pipefail "{0}"
- env:
- MSYSTEM: MINGW64
- CHERE_INVOKING: 1
-
- steps:
-
- - name: Git Clone
- uses: actions/checkout@v4.1.6
- with:
- submodules: true
-
- - 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-x86_64-autotools mingw-w64-x86_64-toolchain
- mingw-w64-x86_64-glib2 mingw-w64-x86_64-pdcurses
- groff zip
-
- - name: Configure Build
- env:
- CURSES_CFLAGS: -I/mingw64/include/pdcurses/
- # FIXME: glib on MinGW supports static linking but the gspawn
- # helper binaries are still linked dynamically, forcing us to ship
- # all DLLs anyway. Therefore it makes little sense to link SciTECO
- # itself statically - it only wastes a few MB.
- # You will also have to add --enable-static-executables.
- # The additional Windows libraries are for PDCursesMod/WinGUI:
-# LIBGLIB_LIBS: -lglib-2.0 -lintl -liconv -lpcre -lole32 -lws2_32 -luuid
- # FIXME: Once there is an --enable-lto, we should use that.
-# CFLAGS: -O3 -flto -DGLIB_STATIC_COMPILATION
- CFLAGS: -O3 -flto
- CXXFLAGS: -O3 -flto
- LDFLAGS: -flto
- run: |
- autoreconf -i
- mkdir build-wingui build-wincon
- (cd build-wingui
- ../configure --with-interface=pdcurses-gui --enable-html-docs --program-prefix=g \
- --with-scitecodatadir=. \
- CURSES_LIBS="-lpdcurses_wingui -lgdi32 -lcomdlg32 -lwinmm")
- (cd build-wincon
- ../configure --with-interface=pdcurses --enable-html-docs \
- --with-scitecodatadir=. \
- CURSES_LIBS="-lpdcurses_wincon -lgdi32 -lwinmm")
-
- - name: make
- run: |
- make -C build-wingui -j 2
- make -C build-wincon -j 2
- - name: make install
- run: |
- make -C build-wingui install-strip
- make -C build-wincon 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 -C build-wingui check TESTSUITEFLAGS="--verbose --color=never"
- make -C build-wincon check TESTSUITEFLAGS="--verbose --color=never"
-
- - name: Prepare Distribution Directory
- env:
- MINGW_BUNDLEDLLS_SEARCH_PATH: /mingw64/bin
- run: |
- mkdir temp-bin/
- cd temp-bin/
- cp -r /mingw64/bin/{gsciteco.exe,sciteco.exe,grosciteco.tes,tedoc.tes} ./
- # datadir is relative to bindir
- cp -r /mingw64/bin/{lib,*.tmac} ./
- cp /mingw64/bin/fallback.teco_ini .teco_ini
- cp -r /mingw64/share/doc/sciteco/* ./
- cp ../COPYING ../ChangeLog ./
- cp /mingw64/bin/gspawn-win64-helper*.exe ./
- # Collect DLLs for all included binaries
- for f in *.exe; do ../contrib/mingw-bundledlls --copy $f; done
- zip -9 -r ../sciteco-pdcurses_nightly_win64.zip .
- - name: Archive Windows Distribution (PDCurses)
- uses: pyTooling/Actions/releaser/composite@v1.0.5
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- tag: nightly
- files: ./*.zip
-
- # NOTE: There is a lot of redundancy with win32-curses.
- # However the Curses version may be linked statically, while Gtk+3 cannot be
- # linked statically on Windows (at least MSYS does not provide
- # static libraries) and would draw in libglib, libintl, libiconv etc. anyway.
- win64-gtk:
- runs-on: windows-2022
-
- defaults:
- run:
- shell: bash.exe --login -eo pipefail "{0}"
- env:
- MSYSTEM: MINGW64
- CHERE_INVOKING: 1
-
- steps:
-
- - name: Git Clone
- uses: actions/checkout@v4.1.6
- with:
- submodules: true
-
- - 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-x86_64-autotools mingw-w64-x86_64-toolchain
- mingw-w64-x86_64-glib2 mingw-w64-x86_64-gtk3 mingw-w64-x86_64-librsvg
- groff zip
-
- - name: Configure Build
- env:
- # FIXME: Once there is an --enable-lto, we should use that.
- CFLAGS: -O3 -flto
- CXXFLAGS: -O3 -flto
- LDFLAGS: -flto
- run: |
- autoreconf -i
- ./configure --with-interface=gtk --enable-html-docs \
- --with-scitecodatadir=.
-
- - 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 --color=never"
-
- - name: Prepare Distribution Directory
- env:
- MINGW_BUNDLEDLLS_SEARCH_PATH: /mingw64/bin
- run: |
- mkdir temp-bin
- cd temp-bin
- cp /mingw64/bin/{sciteco.exe,grosciteco.tes,tedoc.tes} ./
- # datadir is relative to bindir
- cp -r /mingw64/bin/{lib,*.tmac} ./
- cp /mingw64/bin/fallback.teco_ini .teco_ini
- cp /mingw64/bin/fallback.css ../win32/.teco_css .
- cp -r /mingw64/share/doc/sciteco/* ./
- cp ../COPYING ../ChangeLog ./
- cp /mingw64/bin/gspawn-win64-helper*.exe ./
- # Collect DLLs for all included binaries
- for f in *.exe; do ../contrib/mingw-bundledlls --copy $f; done
- #mkdir share
- #cp /mingw64/share/loader.cache share/
- #glib-compile-schemas /mingw64/share/glib-2.0/schemas
- #mkdir -p share/glib-2.0
- #cp /mingw64/share/glib-2.0/gschemas.compiled share/glib-2.0/
- mkdir -p share/icons/Adwaita
- # FIXME: It should be sufficient to package the SVG icons,
- # but I cannot get it to work. Perhaps index.theme would have to be tweaked.
- # We could also try to include a pure scalable icon theme.
- #cp -r /mingw64/share/icons/Adwaita/{scalable*,index.theme} share/icons/Adwaita/
- cp -r /mingw64/share/icons/Adwaita/* share/icons/Adwaita/
- gtk-update-icon-cache-3.0 share/icons/Adwaita/
- # FIXME: It's possible to change the location of loaders.cache via $GDK_PIXBUF_MODULE_FILE.
- # If we did that, we could avoid "reusing" the lib/ directory.
- # This is important when somebody changes $SCITECOPATH.
- cp /mingw64/lib/gdk-pixbuf-2.0/2.10.0/loaders/{pixbufloader_svg.dll,libpixbufloader-png.dll} .
- # Collect DLLs for all pixbuf loaders into the root directory
- for f in *pixbufloader*.dll; do ../contrib/mingw-bundledlls --copy $f; done
- mkdir -p lib/gdk-pixbuf-2.0/2.10.0/loaders/
- mv *pixbufloader*.dll lib/gdk-pixbuf-2.0/2.10.0/loaders/
- cp ../win32/loaders.cache lib/gdk-pixbuf-2.0/2.10.0/
- zip -9 -r ../sciteco-gtk3_nightly_win64.zip .
- - name: Archive Windows Distribution (GTK+ 3)
- uses: pyTooling/Actions/releaser/composite@v1.0.5
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- tag: nightly
- files: ./*.zip