reverted change of #aa7c62f0 in devkit
added script to run checks and tests in container
This commit is contained in:
parent
c099a60ecf
commit
01cf8345a0
|
@ -2,7 +2,7 @@ name: "Build check gemstone in SDK"
|
|||
run-name: SDK build check to ${{ inputs.deploy_target }} by @${{ github.actor }}
|
||||
on: [push, pull_request]
|
||||
env:
|
||||
SDK: 0.2.1-alpine-3.19.1
|
||||
SDK: 0.2.2-alpine-3.19.1
|
||||
jobs:
|
||||
build-check-sdk:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -11,4 +11,4 @@ jobs:
|
|||
- name: Setup SDK
|
||||
run: docker pull servostar/gemstone:sdk-"$SDK" && docker build --tag gemstone:devkit-"$SDK" .
|
||||
- name: Compile
|
||||
run: docker run gemstone:devkit-"$SDK" make check
|
||||
run: docker run gemstone:devkit-"$SDK" sh run-check-test.sh
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
FROM servostar/gemstone:sdk-0.2.1-alpine-3.19.1
|
||||
FROM servostar/gemstone:sdk-0.2.2-alpine-3.19.1
|
||||
LABEL authors="servostar"
|
||||
LABEL version="0.2.1"
|
||||
LABEL version="0.2.2"
|
||||
LABEL description="docker image for setting up the build pipeline on SDK"
|
||||
LABEL website="https://github.com/Servostar/gemstone"
|
||||
|
||||
RUN git clone https://github.com/Servostar/gemstone.git /home/lorang
|
||||
COPY --chown=lorang src /home/lorang/src
|
||||
COPY --chown=lorang tests /home/lorang/tests
|
||||
COPY --chown=lorang CMakeLists.txt /home/lorang/
|
||||
COPY --chown=lorang run-check-test.sh /home/lorang/
|
||||
|
||||
RUN cmake .
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
# Author: Sven Vogel
|
||||
# Created: 02.05.2024
|
||||
# Description: Builds the project and runs tests
|
||||
# Returns 0 on success and 1 when something went wrong
|
||||
|
||||
echo "+--------------------------------------+"
|
||||
echo "| BUILDING all TARGETS |"
|
||||
echo "+--------------------------------------+"
|
||||
|
||||
make -B
|
||||
if [ ! $? -eq 0 ]; then
|
||||
echo "===> failed to build targets"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "+--------------------------------------+"
|
||||
echo "| RUNNING CODE CHECK |"
|
||||
echo "+--------------------------------------+"
|
||||
|
||||
make check
|
||||
if [ ! $? -eq 0 ]; then
|
||||
echo "===> failed code check..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "+--------------------------------------+"
|
||||
echo "| RUNNING TESTS |"
|
||||
echo "+--------------------------------------+"
|
||||
|
||||
ctest -VV --output-on-failure --schedule-random -j 4
|
||||
if [ ! $? -eq 0 ]; then
|
||||
echo "===> failed tests..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "+--------------------------------------+"
|
||||
echo "| COMPLETED CHECK + TESTS SUCCESSFULLY |"
|
||||
echo "+--------------------------------------+"
|
|
@ -1,11 +1,11 @@
|
|||
FROM alpine:3.19.1
|
||||
LABEL authors="servostar"
|
||||
LABEL version="0.2.1"
|
||||
LABEL version="0.2.2"
|
||||
LABEL description="base image for building the gemstone programming language compiler"
|
||||
LABEL website="https://github.com/Servostar/gemstone"
|
||||
|
||||
# install dependencies
|
||||
RUN apk add build-base gcc make cmake bison flex git
|
||||
RUN apk add build-base gcc make cmake bison flex git python3
|
||||
|
||||
# create user for build
|
||||
RUN adduser --disabled-password lorang
|
||||
|
|
Loading…
Reference in New Issue