Run Tests #132
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run Tests | |
| on: | |
| push: | |
| branches: [ "**" ] | |
| pull_request: | |
| branches: [ "**" ] | |
| workflow_dispatch: | |
| inputs: | |
| test_ubuntu: | |
| description: 'Test on Ubuntu' | |
| type: boolean | |
| default: true | |
| test_debian: | |
| description: 'Test on Debian' | |
| type: boolean | |
| default: false | |
| test_arch: | |
| description: 'Test on Arch Linux' | |
| type: boolean | |
| default: false | |
| test_alpine: | |
| description: 'Test on Alpine Linux' | |
| type: boolean | |
| default: false | |
| test_void: | |
| description: 'Test on Void Linux' | |
| type: boolean | |
| default: false | |
| test_gentoo: | |
| description: 'Test on Gentoo Linux' | |
| type: boolean | |
| default: false | |
| test_freebsd: | |
| description: 'Test on FreeBSD' | |
| type: boolean | |
| default: false | |
| test_openbsd: | |
| description: 'Test on OpenBSD' | |
| type: boolean | |
| default: false | |
| test_netbsd: | |
| description: 'Test on NetBSD' | |
| type: boolean | |
| default: false | |
| jobs: | |
| ubuntu: | |
| if: github.event_name != 'workflow_dispatch' || inputs.test_ubuntu | |
| name: Ubuntu | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Configure git safe directory | |
| run: git config --global --add safe.directory /__w/luakit/luakit | |
| - name: Cache APT packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: /var/cache/apt/archives | |
| key: apt-ubuntu-${{ hashFiles('.github/workflows/run-tests.yml') }} | |
| restore-keys: | | |
| apt-ubuntu- | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| ccache \ | |
| luajit \ | |
| libluajit-5.1-dev \ | |
| libjavascriptcoregtk-4.1-dev \ | |
| libwebkit2gtk-4.1-dev \ | |
| libgtk-3-dev \ | |
| libglib2.0-dev \ | |
| lua-check \ | |
| lua-luassert \ | |
| lua-filesystem \ | |
| lua-socket \ | |
| git | |
| - name: Setup ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: ubuntu-ccache | |
| max-size: 500M | |
| - name: Cache build artifacts | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| **/*.o | |
| common/tokenize.h | |
| common/tokenize.c | |
| buildopts.h | |
| key: build-ubuntu-${{ hashFiles('**/*.c', '**/*.h', 'Makefile') }} | |
| restore-keys: | | |
| build-ubuntu- | |
| - name: Build and test | |
| run: | | |
| export CC="ccache gcc" | |
| export CXX="ccache g++" | |
| make -j1 | |
| xvfb-run -a make -j1 run-tests | |
| ccache -s | |
| freebsd: | |
| if: github.event_name == 'workflow_dispatch' && inputs.test_freebsd | |
| name: FreeBSD | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Configure git safe directory | |
| run: git config --global --add safe.directory /__w/luakit/luakit | |
| - name: Build and test on FreeBSD | |
| uses: cross-platform-actions/action@v0.24.0 | |
| with: | |
| operating_system: freebsd | |
| version: '14.0' | |
| shell: bash | |
| sync_files: runner-to-vm | |
| run: | | |
| echo "========================================" | |
| echo "Installing dependencies on FreeBSD" | |
| echo "========================================" | |
| sudo pkg install -y \ | |
| ccache \ | |
| dbus \ | |
| gcc \ | |
| git \ | |
| glib \ | |
| gmake \ | |
| gtk3 \ | |
| libsoup3 \ | |
| lua51-luafilesystem \ | |
| lua51-luasocket \ | |
| lua51 \ | |
| luajit \ | |
| sqlite3 \ | |
| webkit2-gtk_41 \ | |
| pkgconf \ | |
| xorg-vfbserver | |
| echo "" | |
| echo "========================================" | |
| echo "Setting up ccache" | |
| echo "========================================" | |
| export CC="ccache gcc" | |
| export CXX="ccache g++" | |
| echo "" | |
| echo "========================================" | |
| echo "Building luakit" | |
| echo "========================================" | |
| gmake -j1 | |
| echo "" | |
| echo "========================================" | |
| echo "Running tests" | |
| echo "========================================" | |
| gmake -j1 run-tests | |
| echo "" | |
| echo "========================================" | |
| echo "ccache statistics" | |
| echo "========================================" | |
| ccache -s | |
| openbsd: | |
| if: github.event_name == 'workflow_dispatch' && inputs.test_openbsd | |
| name: OpenBSD | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Configure git safe directory | |
| run: git config --global --add safe.directory /__w/luakit/luakit | |
| - name: Build and test on OpenBSD | |
| uses: cross-platform-actions/action@v0.24.0 | |
| with: | |
| operating_system: openbsd | |
| version: '7.5' | |
| shell: bash | |
| sync_files: runner-to-vm | |
| run: | | |
| echo "========================================" | |
| echo "Installing dependencies on OpenBSD" | |
| echo "========================================" | |
| sudo pkg_add \ | |
| ccache \ | |
| git \ | |
| glib2 \ | |
| gmake \ | |
| gtk+3 \ | |
| luafs \ | |
| luasocket \ | |
| luassert \ | |
| luajit \ | |
| sqlite3 \ | |
| webkitgtk41 | |
| echo "" | |
| echo "========================================" | |
| echo "Setting up ccache" | |
| echo "========================================" | |
| export CC="ccache gcc" | |
| export CXX="ccache g++" | |
| echo "" | |
| echo "========================================" | |
| echo "Building luakit" | |
| echo "========================================" | |
| gmake -j1 | |
| echo "" | |
| echo "========================================" | |
| echo "Running tests" | |
| echo "========================================" | |
| gmake -j1 run-tests | |
| echo "" | |
| echo "========================================" | |
| echo "ccache statistics" | |
| echo "========================================" | |
| ccache -s | |
| netbsd: | |
| if: github.event_name == 'workflow_dispatch' && inputs.test_netbsd | |
| name: NetBSD | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Configure git safe directory | |
| run: git config --global --add safe.directory /__w/luakit/luakit | |
| - name: Build and test on NetBSD | |
| uses: cross-platform-actions/action@v0.24.0 | |
| with: | |
| operating_system: netbsd | |
| version: '10.0' | |
| shell: bash | |
| sync_files: runner-to-vm | |
| run: | | |
| echo "========================================" | |
| echo "Installing dependencies on NetBSD" | |
| echo "========================================" | |
| sudo pkgin -y install \ | |
| ccache \ | |
| git \ | |
| glib2 \ | |
| gmake \ | |
| gtk3+ \ | |
| lua51-filesystem \ | |
| lua51-socket \ | |
| LuaJIT2 \ | |
| sqlite3 \ | |
| webkit-gtk \ | |
| pkg-config \ | |
| git || (cat /var/db/pkgin/pkg_install-err.log && false) | |
| echo "" | |
| echo "========================================" | |
| echo "Setting up ccache" | |
| echo "========================================" | |
| export CC="ccache gcc" | |
| export CXX="ccache g++" | |
| echo "" | |
| echo "========================================" | |
| echo "Building luakit" | |
| echo "========================================" | |
| gmake -j1 | |
| echo "" | |
| echo "========================================" | |
| echo "Running tests" | |
| echo "========================================" | |
| gmake -j1 run-tests | |
| echo "" | |
| echo "========================================" | |
| echo "ccache statistics" | |
| echo "========================================" | |
| ccache -s | |
| debian: | |
| if: github.event_name == 'workflow_dispatch' && inputs.test_debian | |
| name: Debian Stable | |
| runs-on: ubuntu-latest | |
| container: debian:stable | |
| steps: | |
| - name: Install git | |
| run: | | |
| apt-get update | |
| apt-get install -y git | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Configure git safe directory | |
| run: git config --global --add safe.directory /__w/luakit/luakit | |
| - name: Cache APT packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: /var/cache/apt/archives | |
| key: apt-debian-${{ hashFiles('.github/workflows/run-tests.yml') }} | |
| restore-keys: | | |
| apt-debian- | |
| - name: Install dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y \ | |
| build-essential \ | |
| ccache \ | |
| luajit \ | |
| libluajit-5.1-dev \ | |
| libjavascriptcoregtk-4.1-dev \ | |
| libwebkit2gtk-4.1-dev \ | |
| libgtk-3-dev \ | |
| libglib2.0-dev \ | |
| lua-check \ | |
| lua-luassert \ | |
| lua-filesystem \ | |
| lua-socket \ | |
| xvfb \ | |
| git | |
| - name: Setup ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: debian-ccache | |
| max-size: 500M | |
| - name: Cache build artifacts | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| **/*.o | |
| common/tokenize.h | |
| common/tokenize.c | |
| buildopts.h | |
| key: build-debian-${{ hashFiles('**/*.c', '**/*.h', 'Makefile') }} | |
| restore-keys: | | |
| build-debian- | |
| - name: Build and test | |
| run: | | |
| export CC="ccache gcc" | |
| export CXX="ccache g++" | |
| make -j1 | |
| make -j1 run-tests | |
| ccache -s | |
| arch: | |
| if: github.event_name == 'workflow_dispatch' && inputs.test_arch | |
| name: Arch Linux | |
| runs-on: ubuntu-latest | |
| container: archlinux:latest | |
| steps: | |
| - name: Install git | |
| run: | | |
| pacman -Syu --noconfirm | |
| pacman -S --noconfirm git | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Configure git safe directory | |
| run: git config --global --add safe.directory /__w/luakit/luakit | |
| - name: Cache Pacman packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: /var/cache/pacman/pkg | |
| key: pacman-${{ hashFiles('.github/workflows/run-tests.yml') }} | |
| restore-keys: | | |
| pacman- | |
| - name: Install dependencies | |
| run: | | |
| pacman -S --noconfirm \ | |
| base-devel \ | |
| ccache \ | |
| dbus \ | |
| git \ | |
| gtk3 \ | |
| lua51-filesystem \ | |
| lua51-socket \ | |
| lua51-luassert \ | |
| luajit \ | |
| sqlite \ | |
| webkit2gtk-4.1 \ | |
| xorg-server-xvfb | |
| - name: Setup ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: arch-ccache | |
| max-size: 500M | |
| - name: Cache build artifacts | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| **/*.o | |
| common/tokenize.h | |
| common/tokenize.c | |
| buildopts.h | |
| key: build-arch-${{ hashFiles('**/*.c', '**/*.h', 'Makefile') }} | |
| restore-keys: | | |
| build-arch- | |
| - name: Build and test | |
| run: | | |
| export CC="ccache gcc" | |
| export CXX="ccache g++" | |
| make -j1 | |
| make -j1 run-tests | |
| ccache -s | |
| alpine: | |
| if: github.event_name == 'workflow_dispatch' && inputs.test_alpine | |
| name: Alpine Linux | |
| runs-on: ubuntu-latest | |
| container: alpine:latest | |
| steps: | |
| - name: Install git | |
| run: apk add --no-cache git | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Configure git safe directory | |
| run: git config --global --add safe.directory /__w/luakit/luakit | |
| - name: Cache APK packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: /var/cache/apk | |
| key: apk-${{ hashFiles('.github/workflows/run-tests.yml') }} | |
| restore-keys: | | |
| apk- | |
| - name: Install dependencies | |
| run: | | |
| apk add --no-cache \ | |
| bash \ | |
| build-base \ | |
| ccache \ | |
| dbus \ | |
| git \ | |
| glib-dev \ | |
| gtk+3.0-dev \ | |
| lua5.1-filesystem \ | |
| lua5.1-socket \ | |
| lua5.1-busted \ | |
| luajit-dev \ | |
| sqlite-dev \ | |
| webkit2gtk-4.1-dev \ | |
| xvfb-run | |
| - name: Setup ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: alpine-ccache | |
| max-size: 500M | |
| - name: Cache build artifacts | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| **/*.o | |
| common/tokenize.h | |
| common/tokenize.c | |
| buildopts.h | |
| key: build-alpine-${{ hashFiles('**/*.c', '**/*.h', 'Makefile') }} | |
| restore-keys: | | |
| build-alpine- | |
| - name: Build and test | |
| run: | | |
| export CC="ccache gcc" | |
| export CXX="ccache g++" | |
| make -j1 | |
| xvfb-run -a make -j1 run-tests | |
| ccache -s | |
| void: | |
| if: github.event_name == 'workflow_dispatch' && inputs.test_void | |
| name: Void Linux | |
| runs-on: ubuntu-latest | |
| container: ghcr.io/void-linux/void-linux:latest-full-x86_64 | |
| steps: | |
| - name: Install git | |
| run: xbps-install -Syu xbps && xbps-install -y git | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Configure git safe directory | |
| run: git config --global --add safe.directory /__w/luakit/luakit | |
| - name: Update container packages | |
| run: xbps-install -Syu | |
| - name: Cache xbps packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: /var/cache/xbps | |
| key: xbps-${{ hashFiles('.github/workflows/run-tests.yml') }} | |
| restore-keys: | | |
| xbps- | |
| - name: Install dependencies | |
| run: | | |
| xbps-install -Sy \ | |
| LuaJIT \ | |
| LuaJIT-devel \ | |
| base-devel \ | |
| ccache \ | |
| glib-devel \ | |
| gtk+3-devel \ | |
| libwebkit2gtk41-devel \ | |
| lua51-luafilesystem \ | |
| lua51-luasocket \ | |
| luarocks \ | |
| pkg-config \ | |
| sqlite-devel \ | |
| xorg-server-xvfb | |
| luarocks install luassert | |
| - name: Setup ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: void-ccache | |
| max-size: 500M | |
| - name: Cache luarocks | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.luarocks | |
| key: luarocks-void-${{ hashFiles('.github/workflows/run-tests.yml') }} | |
| restore-keys: | | |
| luarocks-void- | |
| - name: Cache build artifacts | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| **/*.o | |
| common/tokenize.h | |
| common/tokenize.c | |
| buildopts.h | |
| key: build-void-${{ hashFiles('**/*.c', '**/*.h', 'Makefile') }} | |
| restore-keys: | | |
| build-void- | |
| - name: Build and test | |
| run: | | |
| export CC="ccache gcc" | |
| export CXX="ccache g++" | |
| make -j1 | |
| make -j1 run-tests | |
| ccache -s | |
| gentoo: | |
| if: github.event_name == 'workflow_dispatch' && inputs.test_gentoo | |
| name: Gentoo Linux | |
| runs-on: ubuntu-latest | |
| container: gentoo/stage3:latest | |
| timeout-minutes: 120 | |
| steps: | |
| - name: Setup binary packages and install git | |
| run: | | |
| # Enable binary packages | |
| mkdir -p /etc/portage/binrepos.conf /etc/portage/package.use | |
| echo -e "[gentoobinhost]\npriority = 9999\nsync-uri = https://distfiles.gentoo.org/releases/amd64/binpackages/17.1/x86-64/" > /etc/portage/binrepos.conf/gentoobinhost.conf | |
| # Enable X USE flag for webkit-gtk | |
| echo "net-libs/webkit-gtk X" >> /etc/portage/package.use/webkit-gtk | |
| emerge --sync || emerge-webrsync | |
| emerge --getbinpkg --ask=n dev-vcs/git | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Configure git safe directory | |
| run: git config --global --add safe.directory /__w/luakit/luakit | |
| - name: Cache binary packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: /var/cache/binpkgs | |
| key: gentoo-binpkgs-${{ hashFiles('.github/workflows/run-tests.yml') }} | |
| restore-keys: | | |
| gentoo-binpkgs- | |
| - name: Cache distfiles | |
| uses: actions/cache@v4 | |
| with: | |
| path: /var/cache/distfiles | |
| key: gentoo-distfiles-${{ hashFiles('.github/workflows/run-tests.yml') }} | |
| restore-keys: | | |
| gentoo-distfiles- | |
| - name: Install dependencies | |
| run: | | |
| emerge --getbinpkg --ask=n \ | |
| dev-db/sqlite \ | |
| dev-lang/luajit \ | |
| dev-libs/glib \ | |
| dev-lua/luafilesystem \ | |
| dev-lua/luasocket \ | |
| dev-util/ccache \ | |
| net-libs/webkit-gtk:4.1 \ | |
| sys-apps/dbus \ | |
| x11-base/xorg-server \ | |
| x11-libs/gtk+:3 | |
| - name: Setup ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: gentoo-ccache | |
| max-size: 500M | |
| - name: Cache build artifacts | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| **/*.o | |
| common/tokenize.h | |
| common/tokenize.c | |
| buildopts.h | |
| key: build-gentoo-${{ hashFiles('**/*.c', '**/*.h', 'Makefile') }} | |
| restore-keys: | | |
| build-gentoo- | |
| - name: Build and test | |
| run: | | |
| export CC="ccache gcc" | |
| export CXX="ccache g++" | |
| make -j1 | |
| make -j1 run-tests | |
| ccache -s |