Skip to content

Commit

Permalink
no locking while building using depot
Browse files Browse the repository at this point in the history
but less parallell builds in each build

new depot builder has 32 GB RAM, so "should" work
  • Loading branch information
carlhoerberg committed Mar 31, 2023
1 parent 4ce4815 commit 3d02bb1
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
build-args: |
build_image=84codes/crystal:1.7.3-${{ matrix.os }}
version=${{ env.version }}
DEB_BUILD_OPTIONS="parallel=4"
DEB_BUILD_OPTIONS="parallel=1"
outputs: builds

- uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
MAKEFLAGS=-j3
MAKEFLAGS=-j1
2 changes: 1 addition & 1 deletion .github/workflows/rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
build-args: |
build_image=84codes/crystal:1.7.3-${{ matrix.os }}
version=${{ env.version }}
MAKEFLAGS=-j4
MAKEFLAGS=-j1
outputs: RPMS

- uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ RUN make js lib
COPY --from=docbuilder /tmp/openapi/openapi.yaml /tmp/openapi/.spectral.json openapi/
COPY --from=docbuilder /tmp/static/docs/index.html static/docs/index.html
ARG MAKEFLAGS=-j2
RUN --mount=type=cache,target=/tmp/lock,sharing=locked make all bin/lavinmq-debug
RUN make all bin/lavinmq-debug

# Resulting image with minimal layers
FROM ubuntu:22.04
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.deb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ COPY debian/ debian/
COPY extras/lavinmq.service debian/
RUN sed -i -E "s/^(lavinmq) \(.*\)/\1 \(${version}-1\)/" debian/changelog
ARG DEB_BUILD_OPTIONS="parallel=2"
RUN --mount=type=cache,target=/tmp/lock,sharing=locked debuild -us -uc
RUN debuild -us -uc

FROM ubuntu:20.04 AS test
COPY --from=builder /usr/src/*deb .
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.rpm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ COPY src/ src/
RUN sed -i -E "s/(VERSION =) .*/\1 \"$version\"/" src/lavinmq/version.cr
RUN tar -czf /root/rpmbuild/SOURCES/lavinmq.tar.gz -C /usr/src lavinmq
ARG MAKEFLAGS=-j2
RUN --mount=type=cache,target=/tmp/lock,sharing=locked rpmbuild -ba /root/rpmbuild/SPECS/lavinmq.spec
RUN rpmbuild -ba /root/rpmbuild/SPECS/lavinmq.spec
RUN rpmlint /root/rpmbuild/RPMS/* || true

FROM fedora:37 AS test
Expand Down

0 comments on commit 3d02bb1

Please sign in to comment.