From bd69a769e883fddcc82d256ec8f3bba052ee99d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Sun, 25 Aug 2024 03:43:34 +0200 Subject: [PATCH] CI: docker test --- .github/workflows/linux.yml | 13 ++++++++++ src/scripts/build.sh | 50 +++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 .github/workflows/linux.yml create mode 100755 src/scripts/build.sh diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 000000000..63922e8a8 --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,13 @@ +name: Linux + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Build + run: ./src/scripts/build.sh diff --git a/src/scripts/build.sh b/src/scripts/build.sh new file mode 100755 index 000000000..a90ef4c74 --- /dev/null +++ b/src/scripts/build.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# +# Friction - https://friction.graphics +# +# Copyright (c) Friction contributors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +set -e -x + +CWD=`pwd` +MKJOBS=${MKJOBS:-2} +COMMIT=`git rev-parse --short=8 HEAD` +BRANCH=`git rev-parse --abbrev-ref HEAD` + +ASDK=20240401 +SDK=20240609 +URL=https://github.com/friction2d/friction-sdk/releases/download/${SDK} +APPIMAGE_TAR=friction-appimage-tools-${ASDK}.tar.xz +SDK_TAR=friction-vfxplatform-CY2021-sdk-${SDK}.tar.bz2 + +mkdir distfiles +cd distfiles + +if [ ! -d "linux" ]; then + if [ ! -f "${APPIMAGE_TAR}" ]; then + wget ${URL}/${APPIMAGE_TAR} + fi + tar xvf ${APPIMAGE_TAR} +fi + +if [ ! -f "${SDK_TAR}" ]; then + wget ${URL}/${SDK_TAR} +fi + +cd ${CWD} + +MKJOBS=${MKJOBS} REL=0 BRANCH=${BRANCH} COMMIT=${COMMIT} ./src/scripts/run_vfxplatform.sh