CI: switch push workflow to simple script

This commit is contained in:
Adriaan de Groot 2023-09-28 22:13:23 +02:00
parent 0eb84acc4b
commit 7b5a2ad68c
2 changed files with 23 additions and 3 deletions

View File

@ -4,7 +4,6 @@ on:
push:
branches:
- calamares
- 3.2.x-stable
pull_request:
types:
- opened
@ -20,6 +19,7 @@ env:
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
-DWITH_PYTHONQT=OFF
-DCMAKE_BUILD_TYPE=Debug
GIT_HASH: ${{ github.event.head_commit.id }}
jobs:
build:
@ -34,5 +34,5 @@ jobs:
shell: bash
run: ./ci/deps-neon.sh
- name: "build"
id: build
uses: calamares/actions/generic-build@v4
shell: bash
run: ./ci/build.sh

20
ci/build.sh Executable file
View File

@ -0,0 +1,20 @@
#! /bin/sh
#
# Generic build (driven by environment variables)
#
# Sanity check
test -n "$BUILDDIR" || { echo "! \$BUILDDIR not set" ; exit 1 ; }
mkdir -p "$BUILDDIR"
test -f "$SRCDIR/CMakeLists.txt" || { echo "! Missing $SRCDIR/CMakeLists.txt" ; exit 1 ; }
BUILD_MESSAGE="No commit info"
test -n "$GIT_HASH" && BUILD_MESSAGE=$( git log -1 --abbrev-commit --pretty=oneline --no-decorate "$GIT_HASH" )
echo "::" ; echo ":: $BUILD_MESSAGE" ; echo "::"
cmake -S "$SRCDIR" -B "$BUILDDIR" $CMAKE_ARGS || exit 1
make -C "$BUILDDIR" -j2 VERBOSE=1 || exit 1
make -C "$BUILDDIR" install VERBOSE=1 || exit 1
echo "::" ; echo ":: $BUILD_MESSAGE" ; echo "::"