Skip to content

Commit

Permalink
.github/workflows/tests: Extend to macos and electron port.
Browse files Browse the repository at this point in the history
  • Loading branch information
aadcg committed Mar 18, 2024
1 parent 38ecbcd commit 366c066
Showing 1 changed file with 26 additions and 29 deletions.
55 changes: 26 additions & 29 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,46 @@ name: Tests

on:
push:
branches: [ master ]
branches: [ tests ]
pull_request:
branches: [ master ]
types: [ opened, synchronize, closed ]

jobs:
test:
name: ${{matrix.lisp}} on ${{matrix.os}}
name: ${{matrix.renderer}} on ${{matrix.os}}
strategy:
matrix:
lisp: [sbcl-bin]
lisp-flags: [dynamic-space-size=3072]
renderer: [gi-gtk]
os: [ubuntu-latest]
renderer: [gi-gtk,electron]
os: [ubuntu-latest,macos-latest]
exclude:
- os: macos-latest
renderer: gi-gtk
runs-on: ${{matrix.os}}

steps:
- uses: actions/checkout@v4
- name: Cache git folder
uses: actions/cache@v4
with:
path: .git
key: git-folder

- name: Checkout
uses: actions/checkout@v4
with:
show-progress: 'false'
submodules: 'true'

- name: Register submodules in ASDF
run: |
mkdir -p ~/.config/common-lisp/source-registry.conf.d/
echo "(:tree \"$PWD\")" > ~/.config/common-lisp/source-registry.conf.d/asdf.conf
echo "(:tree \"$PWD/_build\")" >> ~/.config/common-lisp/source-registry.conf.d/asdf.conf
- name: Install Roswell
env:
LISP: ${{matrix.lisp}}
run: curl -L https://raw.githubusercontent.com/roswell/roswell/master/scripts/install-for-ci.sh | sh -x

- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y libfixposix-dev libwebkit2gtk-4.1-0 glib-networking gsettings-desktop-schemas
- name: Install nix
uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable

- name: Load renderer Nyxt system
run: |
ros ${{matrix.lisp-flags}} -e '(handler-case (asdf:load-system :nyxt/${{matrix.renderer}}-application) (error (c) (format t "Error: ~s~%~a~%" c c) (uiop:quit 1)))'
- name: Compile ${{matrix.renderer}} port on ${{matrix.os}}
run: nix-shell build-scripts/shell-${{matrix.renderer}}.nix --run 'make all NYXT_RENDERER=${{matrix.renderer}}'

- name: Run tests
run: |
ros ${{matrix.lisp-flags}} -e '(handler-case (asdf:load-system :nyxt/tests) (error (c) (format t "Error: ~s~%~a~%" c c) (uiop:quit 1)))' \
-e '(let ((output (lisp-unit2:run-tests :package :nyxt/tests))) (lisp-unit2:print-summary output) (when (or (lisp-unit2:failed output) (lisp-unit2:errors output)) (uiop:quit 1)))'
- name: Test ${{matrix.renderer}} port on ${{matrix.os}}
env:
NASDF_NON_INTERACTIVE_TESTS: true
# It runs the tests for system nyxt, not nyxt/${{matrix.renderer}}.
run: nix-shell build-scripts/shell-${{matrix.renderer}}.nix --run 'make check'

0 comments on commit 366c066

Please sign in to comment.