Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add debugging to fix branches #891

Merged
merged 15 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@ jobs:
docker-image: ['gerbil', 'gerbilxx']
steps:
- uses: actions/checkout@v3
- name: print out github context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: List of all Github Actions env vars
run: env
- name: Build the Docker image
run: make -C docker ${{ matrix.docker-image }} GERBIL_VERSION=${{github.head_ref}}
run: make -C docker ${{ matrix.docker-image }} REPO=${{ github.repository }} BRANCH=${{ github.head_ref }}
- name: Push to Docker Hub on Pushes to master
run: |
docker login -u gerbil -p ${{ secrets.DOCKER_TOKEN }}
Expand Down
12 changes: 6 additions & 6 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ARG distro
ARG with_db
ARG gerbil_version
ARG repo
ARG branch
ARG cores
ARG configure_args
ARG packages
Expand All @@ -9,7 +10,6 @@ FROM ${distro}:latest as base
ARG cores
ARG distro
ARG with_db
ARG gerbil_version
ARG packages
ENV PATH=/opt/gerbil/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
ENV GERBIL_BUILD_CORES=$cores
Expand Down Expand Up @@ -44,12 +44,12 @@ RUN case ${distro} in \

FROM base as gerbil
ARG cores
ARG gerbil_version
ARG repo
ARG branch
ARG configure_args
ENV GERBIL_GCC=g++
RUN cd /opt && git clone https://github.com/vyzo/gerbil gerbil-src
RUN cd /opt/gerbil-src && git fetch -a && git fetch --tags && git checkout ${gerbil_version} \
&& eval ./configure --prefix=/opt/gerbil --enable-shared=no ${configure_args}
RUN cd /opt && eval git clone -b ${branch} https://github.com/${repo} gerbil-src \
&& cd /opt/gerbil-src && eval ./configure --prefix=/opt/gerbil --enable-shared=no ${configure_args}

RUN cd /opt/gerbil-src && make -j ${GERBIL_BUILD_CORES} && make install

Expand Down
22 changes: 15 additions & 7 deletions docker/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
.PHONY: alpine amazonlinux ubuntu fedora ubuntu-current-jedi final

$(info the branch is $(GERBIL_VERSION))
ifeq ($(GERBIL_VERSION),)
GERBIL_VERSION := $(shell git symbolic-ref --short HEAD)
endif
$(info the branch is $(GERBIL_VERSION))

ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
cores := $(shell nproc)
arch := $(shell uname -m)
DEFAULT=gerbilxx

ifeq ($(BRANCH),)
BRANCH := $(shell git symbolic-ref --short HEAD)
endif

ifeq ($(REPO),)
REPO := "mighty-gerbils/gerbil"
endif

cores := $(shell nproc)
$(info the branch is $(BRANCH) and the repo is $(REPO) cores are: $(cores))

alpine_packages := autoconf \
automake \
cmake \
Expand Down Expand Up @@ -85,6 +90,8 @@ gerbilxx:
docker build --target final \
--rm=true --no-cache \
--build-arg gerbil_version=$(GERBIL_VERSION) \
--build-arg repo="$(REPO)" \
--build-arg branch="$(BRANCH)" \
--build-arg packages="$(alpine_packages)" \
--build-arg configure_args="--enable-leveldb --enable-libxml --enable-libyaml --enable-lmdb --enable-zlib --enable-c++ --enable-march=" \
--build-arg cores=$(cores) \
Expand All @@ -96,7 +103,8 @@ gerbilxx:
gerbil:
docker build --target final \
--rm=true --no-cache \
--build-arg gerbil_version=$(GERBIL_VERSION) \
--build-arg repo="$(REPO)" \
--build-arg branch="$(BRANCH)" \
--build-arg packages="$(alpine_packages)" \
--build-arg configure_args="--enable-march=" \
--build-arg cores=$(cores) \
Expand Down