diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 586558d9..4af89fdb 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -24,7 +24,7 @@ jobs: path: /tmp/cicache - name: 'Prepare Docker Image' run: | - echo -e ' prefix=/ \n CC=clang \n CXX=clang++ \n CLANG_TIDY=clang-tidy ' > config-defaults.mk + echo -e ' prefix=/\n CC=clang \n CXX=clang++ \n CLANG_TIDY=clang-tidy ' > config-defaults.mk misc/cirun -u 1000 misc/version.sh - name: 'Build Dist Assets' run: | @@ -54,11 +54,13 @@ jobs: path: /tmp/cicache - name: 'Prepare Docker Image' run: | - echo -e ' prefix=/ \n CC=clang \n CXX=clang++ \n CLANG_TIDY=clang-tidy ' > config-defaults.mk + # Test the most recent g++ via Arch + echo -e ' prefix=/\n' > config-defaults.mk misc/cirun -u 1000 misc/version.sh - name: 'Run X11 GUI Tests' run: | - $CIMAKE -j`nproc` all check + $CIMAKE GCC_COLORS="" -j`nproc` all + $CIMAKE -j`nproc` check $CIMAKE x11test-v # Artifact upload from x11test - uses: actions/upload-artifact@v3.1.3 @@ -82,7 +84,7 @@ jobs: path: /tmp/cicache - name: 'Prepare Docker Image' run: | - echo -e ' prefix=/ \n CC=clang \n CXX=clang++ \n CLANG_TIDY=clang-tidy ' > config-defaults.mk + echo -e ' prefix=/\n CC=clang \n CXX=clang++ \n CLANG_TIDY=clang-tidy ' > config-defaults.mk misc/cirun -u 1000 misc/version.sh - name: 'Make all check' run: | diff --git a/Makefile.mk b/Makefile.mk index fc73e891..5cefef53 100644 --- a/Makefile.mk +++ b/Makefile.mk @@ -84,6 +84,9 @@ pkgdir ?= $(pkgprefix)/anklang-$(version_major)-$(version_minor) pkgsharedir ?= $(pkgdir)/share .config.defaults += prefix bindir sharedir mandir docdir libdir pkgprefix pkgdir pkgdocdir ?= $(pkgdir)/doc +ifneq (1,$(words [$(prefix)])) # guard against `prefix := / / ` etc which will confuse `rm -rf` +$(error Variable `prefix` must expand to a single directory name, current value: `prefix:=$(prefix)`) +endif # == Target Collections == ALL_TARGETS ::= diff --git a/external/websocketpp b/external/websocketpp index 56123c87..b9aeec6e 160000 --- a/external/websocketpp +++ b/external/websocketpp @@ -1 +1 @@ -Subproject commit 56123c87598f8b1dd471be83ca841ceae07f95ba +Subproject commit b9aeec6eaf3d5610503439b4fae3581d9aff08e8 diff --git a/misc/Dockerfile.arch b/misc/Dockerfile.arch index dd32bfbb..1ea7a9f3 100644 --- a/misc/Dockerfile.arch +++ b/misc/Dockerfile.arch @@ -24,11 +24,14 @@ RUN pacman -Sy --noconfirm archlinux-keyring && pacman-key --init && pacman-key # Castxml is not provided by pacman RUN cd /tmp && git clone https://github.com/CastXML/CastXML.git && cd CastXML && cmake . && make -j && sudo make install +# Provide a fast JS package manager +RUN npm install -g pnpm@latest + # Become non-root RUN groupadd --gid 1000 builder \ && useradd --uid 1000 --gid 1000 --create-home --shell /bin/bash builder \ && echo "builder ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/builder USER builder -# docker build -f misc/Dockerfile.arch -t anklang-arch misc/ -# docker run -ti --rm -v $PWD:/anklang -w /anklang anklang-arch +# docker build -t arch:latest -f misc/Dockerfile.arch misc +# docker run -i -t --rm -v $PWD:/anklang -w /anklang arch:latest diff --git a/misc/Dockerfile.focal b/misc/Dockerfile.focal index 5826d769..d72c6471 100644 --- a/misc/Dockerfile.focal +++ b/misc/Dockerfile.focal @@ -80,6 +80,9 @@ RUN : \ && apt-get install -y nodejs \ && apt-get clean +# Provide a fast JS package manager +RUN npm install -g bun@latest + # Build stripped down Fluidsynth version without drivers (not needed atm) RUN exit 0 && \ mkdir -p /tmp/fluid/build && cd /tmp/fluid/ && \ diff --git a/misc/cirun b/misc/cirun index 6076814b..cc074575 100755 --- a/misc/cirun +++ b/misc/cirun @@ -46,12 +46,12 @@ echo -n `git rev-parse HEAD`" " && git describe 2>/dev/null || git describe - # Build Docker image # docker build -t $CITAG -f misc/Dockerfile.CIDIST misc -docker buildx >/dev/null 2>&1 || die "missing docker-buildx-plugin" ( DOCKER_IMAGES=$(docker images --format "|{{.ID}}|{{.Repository}}:{{.Tag}}|") # buffer image list to avoid SIGPIPE test -n "${CITAG:-}" || die "missing docker image, CITAG is unset" grep -q "|$CITAG:latest|" <<< "$DOCKER_IMAGES" || { echo "$SCRIPTNAME: need to build docker image: $CITAG:latest" + docker buildx >/dev/null 2>&1 || die "missing docker-buildx-plugin" # determine Dockerfile DOCKERFILE="./Dockerfile.$CITAG" test -r "$DOCKERFILE" ||