Skip to content

Commit

Permalink
Fix up build and add automated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Eeems committed Dec 15, 2023
1 parent 4cd33c4 commit 5b46d2d
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 14 deletions.
26 changes: 19 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,18 @@ jobs:
needs: [build]
steps:
- uses: actions/download-artifact@v3
id: download
id: repo
with:
name: repo
- uses: actions/download-artifact@v3
id: build
with:
name: build
- name: Copy tests
run: |
cp -al \
${{ steps.build.outputs.download-path }}/opt/share/tests \
${{ steps.repo.outputs.download-path }}
- uses: Eeems-Org/run-in-remarkable-action@v1
with:
setup: |
Expand All @@ -73,12 +82,15 @@ jobs:
set -ex
echo Y | toltecctl generate-opkg-conf
opkg update
opkg install oxide
# systemctl disable --now xochitl
# systemctl enable --now tarnish
# TODO install and run tests
opkg remove --force-removal-of-dependent-packages liboxide
path: ${{ steps.download.outputs.download-path }}
opkg install oxide oxide-extra inject_evdev liboxide-dev
# TODO test tarnish service
ls tests | while read test; do
pushd tests/$test
tests/$test/$test
popd
done
opkg remove --force-removal-of-dependent-packages liboxide libsentry
path: ${{ steps.repo.outputs.download-path }}
release:
needs: [build,test]
if: ${{ github.ref == 'refs/heads/master' }}
Expand Down
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ endif

OBJ += $(BUILD)/oxide/Makefile

clean:
rm -rf $(DIST) $(BUILD)
clean-base:
rm -rf $(DIST) $(BUILD)/oxide

release: clean build $(DIST)
clean: clean-base
rm -rf $(BUILD)

release: clean-base build $(DIST)
# Force sentry makefile to regenerate so that install targets get when being build in toltecmk
cd $(BUILD)/oxide/shared/sentry && make qmake
# Force liboxide makefile to regenerate so that install targets get when being build in toltecmk
Expand Down
1 change: 0 additions & 1 deletion applications/system-service/wpa_supplicant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,3 @@ FiW1Wpa_supplicant1NetworkInterface::~FiW1Wpa_supplicant1NetworkInterface()
{
}

#include "moc_wpa_supplicant.cpp"
2 changes: 1 addition & 1 deletion package
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ liboxide-dev() {
installdepends=("liboxide=$pkgver")

package() {
install -D -m 755 -t "$pkgdir"/opt/lib/pkgconfig "$srcdir"/release/opt/lib/pkgconfig/liboxide.pc
install -D -m 755 -t "$pkgdir"/opt/lib/pkgconfig "$srcdir"/release/opt/lib/pkgconfig/oxide.pc
install -D -m 755 -t "$pkgdir"/opt/include "$srcdir"/release/opt/include/epframebuffer.h
install -D -m 755 -t "$pkgdir"/opt/include "$srcdir"/release/opt/include/liboxide.h
cp -ar "$srcdir"/release/opt/include/liboxide/ "$pkgdir"/opt/include/
Expand Down
2 changes: 0 additions & 2 deletions shared/liboxide/devicesettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,5 +456,3 @@ namespace Oxide {
return _virtualScreenGeometry;
}
}

#include "moc_devicesettings.cpp"
2 changes: 2 additions & 0 deletions tests/liboxide/liboxide.pro
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ QT += testlib
QT += gui

target.path = /opt/share/tests/liboxide/liboxide
INSTALLS += target

CONFIG += qt
CONFIG += console
CONFIG += warn_on
CONFIG += depend_includepath
CONFIG += testcase
CONFIG += no_testcase_installs
CONFIG -= app_bundle

TEMPLATE = app
Expand Down

0 comments on commit 5b46d2d

Please sign in to comment.