Skip to content

Commit

Permalink
Merge branch 'g++-bun-pnpm-ci'
Browse files Browse the repository at this point in the history
* g++-bun-pnpm-ci:
  GITHUB: workflows/testing.yml: test Arch builds with g++
  MISC: Dockerfile.arch: provide pnpm as JS package manager
  MISC: Dockerfile.arch: update build comments
  MISC: Dockerfile.focal: provide bun as JS package manager
  MISC: cirun: defer check for docker-buildx-plugin until we actually need it
  Makefile.mk: guard against `prefix := / / ` etc which will confuse `rm -rf`
  EXTERNAL: websocketpp: update zaphoyd/websocketpp to 2022-05-24 18:42:50 2022 -0500
	git -C external/websocketpp/ checkout b9aeec6eaf3d5610503439b4fae3581d9aff08e8
	This includes fixes applied after version 0.8.2, in particular it allows g++ to build
	the sources with C++20 enabled. See:
	  zaphoyd/websocketpp#991

Signed-off-by: Tim Janik <[email protected]>
  • Loading branch information
tim-janik committed Oct 27, 2023
2 parents 63e4292 + b0a4f6a commit 042fd7a
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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/[email protected]
Expand All @@ -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: |
Expand Down
3 changes: 3 additions & 0 deletions Makefile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 ::=
Expand Down
2 changes: 1 addition & 1 deletion external/websocketpp
Submodule websocketpp updated 102 files
7 changes: 5 additions & 2 deletions misc/Dockerfile.arch
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions misc/Dockerfile.focal
Original file line number Diff line number Diff line change
Expand Up @@ -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/ && \
Expand Down
2 changes: 1 addition & 1 deletion misc/cirun
Original file line number Diff line number Diff line change
Expand Up @@ -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" ||
Expand Down

0 comments on commit 042fd7a

Please sign in to comment.