Skip to content

Commit

Permalink
Cleaning lints
Browse files Browse the repository at this point in the history
  • Loading branch information
tjayrush committed Jan 31, 2025
1 parent 8c28367 commit 30a29fd
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 19 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ jobs:
git checkout ${{ github.head_ref }}
git submodule update --init --recursive
cd scripts
echo "repo:" ${{ github.repository }}
echo "sha3:" ${{ github.sha }}
echo "head:" ${{ github.head_ref }}
CONFIG_FILE=$HOME/trueBlocks.toml bash test-with-docker.sh ${{ github.repository }} ${{ github.sha }} ${{ github.head_ref }}
docker system prune -af --filter "until=1h"
echo "Results placed in /home/testuser/testing/${{ github.sha }}"
44 changes: 28 additions & 16 deletions scripts/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,46 @@
# Go Version
# Use whatever base image you need:
FROM golang:1.23.1-bullseye

# Declare build arguments so they're visible inside the Dockerfile
ARG repo
ARG commit_sha
ARG branch

RUN apt-get update -y
RUN apt install -y g++ gcc make cmake git nano libcurl3-dev python3 python3-dev \
curl bash linux-headers-amd64 xz-utils jq unzip

# Switch into /root
WORKDIR /root

RUN git clone https://github.com/TrueBlocks/trueblocks-core.git /root/trueblocks-core
# Debug: confirm we have the correct values
RUN echo "DEBUG: repo=${repo}, branch=${branch}"

# 1) Clone
RUN git clone --progress "https://github.com/${repo}.git" /root/trueblocks-core

# 2) Move into the cloned repo
WORKDIR /root/trueblocks-core
RUN git checkout ${branch} && git submodule update --init --recursive
RUN mkdir build

# 3) Check out the desired branch
RUN git checkout "${branch}"

# 4) Update/init submodules
RUN git submodule update --init --recursive

# 5) Make a build folder
RUN mkdir -v build

# 6) Switch into that folder
WORKDIR /root/trueblocks-core/build
RUN ../scripts/go-work-sync.sh && cmake ../src
RUN make -j4

# RUN git clone --progress https://github.com/$repo.git /root/trueblocks-core && \
# cd /root/trueblocks-core && \
# git checkout $branch && \
# git submodule update --init --recursive && \
# mkdir -v build && \
# cd build && \
# ../scripts/go-work-sync.sh && \
# cmake ../src && \
# make -j 4
# 7) Optionally sync go.work modules (if your script does that)
RUN ../scripts/go-work-sync.sh

# 8) Run CMake
RUN cmake ../src

# 9) Run make (compile)
RUN make -j4

# Finally, define your entrypoint (if you want to run tests or something)
ENTRYPOINT ["bash", "/root/trueblocks-core/scripts/build-and-test.sh"]

0 comments on commit 30a29fd

Please sign in to comment.