Skip to content

Commit

Permalink
ci: Changed folder name from release to repro
Browse files Browse the repository at this point in the history
  • Loading branch information
ShahanaFarooqui committed Dec 3, 2024
1 parent 2791c60 commit 147650a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
41 changes: 20 additions & 21 deletions .github/workflows/repro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,48 +31,47 @@ jobs:
- name: Builder image setup
run: docker build -t cl-repro-${{ matrix.version }} - < contrib/reprobuild/Dockerfile.${{ matrix.version }}

- name: Build using the builder image and store Git state
- name: Build reproducible image and store Git state
run: |
# Create release directory.
mkdir $GITHUB_WORKSPACE/release
# Create repro directory.
mkdir $GITHUB_WORKSPACE/repro
# Perform the repro build.
docker run --name cl-build -v $GITHUB_WORKSPACE:/repo -e FORCE_MTIME=$(date +%F) -t cl-repro-${{ matrix.version }}
# Commit the image in order to inspect the build later.
docker commit cl-build cl-release
docker commit cl-build cl-repro
# Inspect the version.
docker run --rm -v $GITHUB_WORKSPACE:/repo -t cl-release bash -c "make version > /repo/release/version.txt"
docker run --rm -v $GITHUB_WORKSPACE:/repo -t cl-repro bash -c "make version > /repo/repro/version.txt"
# Inspect the Git tree state.
docker run --rm -v $GITHUB_WORKSPACE:/repo -t cl-release bash -c "\
git --no-pager status > /repo/release/git.log && \
git --no-pager diff >> /repo/release/git.log"
docker run --rm -v $GITHUB_WORKSPACE:/repo -t cl-repro bash -c "\
git --no-pager status > /repo/repro/git.log && \
git --no-pager diff >> /repo/repro/git.log"
# Change permissions on the release files for access by the runner environment.
sudo chown -R runner $GITHUB_WORKSPACE/release
# Change permissions on the repro files for access by the runner environment.
sudo chown -R runner $GITHUB_WORKSPACE/repro
- name: Assert clean version and release
- name: Assert clean version
run: |
echo 'Version:'
cat release/version.txt
cat repro/version.txt
echo -e
releasefile=$(ls release/clightning-*)
echo 'Release file:'
ls -al release/clightning-*
reprofile=$(ls repro/clightning-*)
echo 'Repro file:'
ls -al repro/clightning-*
echo -e
if [ -n "$(cat release/version.txt | sed -n '/-modded/p')" ] || \
[ -n "$(echo $releasefile | sed -n '/-modded/p')" ]
if [ -n "$(cat repro/version.txt | sed -n '/-modded/p')" ] || \
[ -n "$(echo $reprofile | sed -n '/-modded/p')" ]
then
echo "Git Status and Diff:"
cat release/git.log
cat repro/git.log
echo -e
echo 'Error: release modded / dirty tree.'
echo 'Error: Repository modded / dirty tree.'
exit 1
else
echo 'Success! Clean release.'
echo 'Success! Clean Build.'
fi
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ focal/
jammy/
noble/
release/
repro/
.vscode/
.cache/

Expand Down

0 comments on commit 147650a

Please sign in to comment.