Skip to content

Commit

Permalink
add pull request workflow. fix user in arm installer.
Browse files Browse the repository at this point in the history
  • Loading branch information
ballaswag committed Apr 15, 2024
1 parent 0ce2198 commit d576f4f
Show file tree
Hide file tree
Showing 4 changed files with 119 additions and 6 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ name: guppy build

on:
push:
branches: [ "dev", "main" ]
branches: [ "develop", "main" ]
tags:
- "*"
pull_request:
branches: [ "main" ]

permissions:
contents: write
Expand Down
113 changes: 113 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: validate pull request

on:
pull_request:
branches: [ "main", "develop" ]

jobs:
build:
strategy:
matrix:
include:
- arch: mips-linux-gnu-
theme: zbolt
small: false
rotate: true
calibrate: false
asset: guppyscreen-zbolt

- arch: mips-linux-gnu-
theme: material
small: false
rotate: true
calibrate: false
asset: guppyscreen

- arch: mips-linux-gnu-
theme: material
small: true
rotate: false
calibrate: true
asset: guppyscreen-smallscreen

- arch: aarch64-none-linux-gnu-
theme: material
small: false
rotate: false
calibrate: true
asset: guppyscreen-arm

runs-on: ubuntu-22.04
container:
image: ballaswag/guppydev:latest
options: --user 1001

env:
CROSS_COMPILE: ${{ matrix.arch }}
CC: ${{ matrix.arch }}
CXX: ${{ matrix.arch }}
GUPPY_THEME: ${{ matrix.theme }}

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: set guppyscreen version
run: |
echo "GUPPYSCREEN_VERSION=${{ github.ref_name }}" >> $GITHUB_ENV
- if: matrix.small
name: export screen size
run: |
echo "GUPPY_SMALL_SCREEN=${{ matrix.small }}" >> $GITHUB_ENV
- if: matrix.rotate
name: export screen rotate
run: |
echo "GUPPY_ROTATE=${{ matrix.rotate }}" >> $GITHUB_ENV
- if: matrix.calibrate
name: export touch calibrate
run: |
echo "EVDEV_CALIBRATE=${{ matrix.calibrate }}" >> $GITHUB_ENV
- name: patch lv_drivers
run: |
git apply ../patches/0001-lv_driver_fb_ioctls.patch
working-directory: ./lv_drivers

- name: patch fmt in spdlog
run: |
git apply ../patches/0002-spdlog_fmt_initializer_list.patch
working-directory: ./spdlog

- name: patch dpi text scale in lvgl
run: |
git apply ../patches/0003-lvgl-dpi-text-scale.patch
working-directory: ./lvgl

- name: make wpaclient
run: make wpaclient

- name: make libhv
run: make libhv.a

- name: make libspdlog
run: make libspdlog.a

- name: make guppyscreen
run: make -j

- name: make kd_graphic_mode
run: make kd_graphic_mode

- name: package release
run: |
chmod +x ./release.sh
./release.sh ${{ matrix.asset }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.asset }}
path: ./${{ matrix.asset }}.tar.gz
6 changes: 3 additions & 3 deletions debian/guppyscreen.service
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ StartLimitIntervalSec=0
Type=simple
Restart=always
RestartSec=1
User=biqu
WorkingDirectory=/home/biqu/guppyscreen
ExecStart="/home/biqu/guppyscreen/guppyscreen"
User=<USER>
WorkingDirectory=/home/<USER>/guppyscreen
ExecStart="/home/<USER>/guppyscreen/guppyscreen"

[Install]
WantedBy=multi-user.target
2 changes: 2 additions & 0 deletions installer-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ get_klipper_paths() {
}

install_services() {
sed -i "s|<USER>|$USER|g" ${HOME}/guppyscreen/debian/guppyscreen.service

sudo cp ${HOME}/guppyscreen/debian/disable_blinking_cursor.service /etc/systemd/system
sudo cp ${HOME}/guppyscreen/debian/guppyscreen.service /etc/systemd/system
sudo systemctl enable disable_blinking_cursor.service
Expand Down

0 comments on commit d576f4f

Please sign in to comment.