From 12f3978536f4a6dbe897c6c88db392e42ae1110e Mon Sep 17 00:00:00 2001 From: Brandon Wong Date: Sat, 2 Mar 2024 10:34:06 -0800 Subject: [PATCH 1/2] [SYSTEMD] updated last few files from pi to ubuntu --- systemd/ngrok.service | 6 +++--- systemd/ngrok.sh | 4 ++-- systemd/ngrok_displayer.service | 4 ++-- systemd/set_time.service | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/systemd/ngrok.service b/systemd/ngrok.service index 2ad3e310..a3036ba0 100644 --- a/systemd/ngrok.service +++ b/systemd/ngrok.service @@ -4,10 +4,10 @@ After=net_handler.service [Service] Type=simple -User=pi -WorkingDirectory=/home/pi/runtime/systemd/ +User=ubuntu +WorkingDirectory=/home/ubuntu/runtime/systemd/ ExecStartPre=/bin/sleep 1 -ExecStart=/home/pi/runtime/systemd/ngrok.sh +ExecStart=/home/ubuntu/runtime/systemd/ngrok.sh ExecReload=/bin/kill -SIGINT $MAINPID [Install] diff --git a/systemd/ngrok.sh b/systemd/ngrok.sh index 68c85001..526793a4 100755 --- a/systemd/ngrok.sh +++ b/systemd/ngrok.sh @@ -1,9 +1,9 @@ #!/bin/bash function sigint_handler { - pkill -u pi /home/pi/ngrok + pkill -u ubuntu /home/ubuntu/ngrok } trap 'sigint_handler' INT -nohup /home/pi/ngrok start --all --config /home/pi/runtime/systemd/ngrok.yml > /dev/null +nohup /home/ubuntu/ngrok start --all --config /home/ubuntu/runtime/systemd/ngrok.yml > /dev/null diff --git a/systemd/ngrok_displayer.service b/systemd/ngrok_displayer.service index 56789997..6b8ddd52 100644 --- a/systemd/ngrok_displayer.service +++ b/systemd/ngrok_displayer.service @@ -3,8 +3,8 @@ Description=Serves a webpage that displays the ngrok tunnel IP addresses. [Service] Type=simple -User=pi -WorkingDirectory=/home/pi/runtime/systemd/ +User=ubuntu +WorkingDirectory=/home/ubuntu/runtime/systemd/ ExecStart=python3 ngrok_displayer.py ExecReload=/bin/kill -SIGINT $MAINPID diff --git a/systemd/set_time.service b/systemd/set_time.service index 04a4f983..9a399338 100644 --- a/systemd/set_time.service +++ b/systemd/set_time.service @@ -4,8 +4,8 @@ Description=Sets the time on this raspberry pi when on CalVisitor [Service] Type=oneshot User=root -WorkingDirectory=/home/pi -ExecStart=/home/pi/runtime/systemd/set_time.sh +WorkingDirectory=/home/ubuntu +ExecStart=/home/ubuntu/runtime/systemd/set_time.sh KillSignal=SIGINT [Install] From d95cf43a5e08ed3c46617f152686def4c0c6315b Mon Sep 17 00:00:00 2001 From: Brandon Wong Date: Wed, 6 Mar 2024 20:16:12 -0800 Subject: [PATCH 2/2] updated to v4 in .github/workflows --- .github/workflows/pull_request_ci.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pull_request_ci.yml b/.github/workflows/pull_request_ci.yml index 275d4685..69f4d08a 100644 --- a/.github/workflows/pull_request_ci.yml +++ b/.github/workflows/pull_request_ci.yml @@ -25,7 +25,7 @@ jobs: steps: # First, we check out the repository's code using the Github Actions' "Checkout" tool. - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: 'recursive' @@ -59,7 +59,7 @@ jobs: sudo chown root:root /usr/bin/tar && sudo chmod u+s /usr/bin/tar - name: Cache protobuf-c id: cache-protobuf-c - uses: actions/cache@v3 # Uses the Github Actions' "Cache" tool + uses: actions/cache@v4 # Uses the Github Actions' "Cache" tool with: # These are the files we cache path: | @@ -74,6 +74,15 @@ jobs: run: | sudo chown runner:runner /usr/bin/tar && sudo chmod u+x /usr/bin/tar + # Before we build Runtime, we check the formatting + - name: Debug + run: | + ls + pwd + - name: Format + run: | + ./runtime format check + # This if statement determine whether the cache lookup was a hit (true) or miss (not true--idk, false doesn't work) # If the cache lookup hit, we just run "sudo ldconfig" to tell the linker where to look for # protobuf-c files. If the cache lookup missed, we have to install protobuf-c from scratch @@ -89,11 +98,6 @@ jobs: tar -xzf protobuf-c-1.4.1.tar.gz cd protobuf-c-1.4.1 && ./configure && make && sudo make install && sudo ldconfig - # Before we build Runtime, we check the formatting - - name: Format - run: | - ./runtime format check - # Now that we are done installing Runtime's dependencies, we build Runtime - name: Build run: |