From 07a27d4dd9095aa1cdc29f2dc57e932da4a103f9 Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Sat, 3 Jun 2023 23:48:28 -0400 Subject: [PATCH] Try Gitea Actions --- .gitea/workflows/build.yml | 26 ++++++++++++++++++++++++++ scripts/ci/Dockerfile | 2 -- scripts/install-dependencies.sh | 7 +++++++ 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 .gitea/workflows/build.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml new file mode 100644 index 0000000..29a1995 --- /dev/null +++ b/.gitea/workflows/build.yml @@ -0,0 +1,26 @@ +name: 'Build' + +on: push + +jobs: + check-and-test: + runs-on: ubuntu-latest + container: buildpack-deps:buster + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + - name: Install CMake + run: | + echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/backports.list + apt-get update + apt-get install --no-install-recommends -y -t buster-backports cmake + - name: Install Dependencies + run: ./scripts/install-dependencies.sh amd64 armhf arm64 + - name: Build + run: | + chmod +x ./scripts/ci/run.sh + ./scripts/ci/run.sh + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + path: ./out/**/*.AppImage diff --git a/scripts/ci/Dockerfile b/scripts/ci/Dockerfile index b63fd2c..54ab870 100644 --- a/scripts/ci/Dockerfile +++ b/scripts/ci/Dockerfile @@ -10,7 +10,5 @@ RUN \ # Install ADD ./scripts/install-dependencies.sh / RUN \ - apt-get update && \ - apt-get install --no-install-recommends -y sudo && \ /install-dependencies.sh amd64 armhf arm64 && \ rm -rf /var/lib/apt/lists/* diff --git a/scripts/install-dependencies.sh b/scripts/install-dependencies.sh index 6978ecf..9fb300b 100755 --- a/scripts/install-dependencies.sh +++ b/scripts/install-dependencies.sh @@ -2,6 +2,13 @@ set -e +# Don't Use Sudo When Running As Root +if [ "$(id -u)" -eq 0 ]; then + sudo() { + "$@" + } +fi + # Main Script run() { # Add ARM Repository