-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We ran those in GitLab but now that the integration test works we can also move those. The debootstrap.log is not uploaded for now.
- Loading branch information
Michael Vasseur
committed
Nov 21, 2024
1 parent
7c890e8
commit ca16e75
Showing
6 changed files
with
87 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/bin/bash | ||
|
||
. .github/jobs/ci_settings.sh | ||
|
||
if [ -n "$1" ] && [ "$1" != "default" ]; then | ||
export ARCH="$1" | ||
fi | ||
|
||
function finish() { | ||
echo -e "\\n\\n=======================================================\\n" | ||
echo "Storing artifacts..." | ||
trace_on | ||
set +e | ||
cp /proc/cmdline "$ARTIFACTS/cmdline" | ||
cp /__w/domjudge/domjudge/chroot/domjudge/etc/apt/sources.list "$ARTIFACTS/sources.list" | ||
cp /__w/domjudge/domjudge/chroot/domjudge/debootstrap/debootstrap.log "$ARTIFACTS/debootstrap.log" | ||
} | ||
|
||
FAILED=0 | ||
|
||
trap finish EXIT | ||
|
||
DIR=$PWD | ||
section_start "Debug info" | ||
lsb_release -a | tee -a "$ARTIFACTS/debug-info" | ||
mount | tee -a "$ARTIFACTS/debug-info" | ||
whoami | tee -a "$ARTIFACTS/debug-info" | ||
echo "Dir: $DIR" | tee -a "$ARTIFACTS/debug-info" | ||
section_end | ||
|
||
section_start "Basic judgehost install" | ||
chown -R domjudge ./ | ||
|
||
# configure, make and install (but skip documentation) | ||
sudo -u domjudge make configure | ||
sudo -u domjudge ./configure --with-baseurl='http://localhost/domjudge/' --with-domjudge-user=domjudge --with-judgehost_chrootdir=${DIR}/chroot/domjudge |& tee "$ARTIFACTS/configure.log" | ||
sudo -u domjudge make judgehost |& tee "$ARTIFACTS/make.log" | ||
make install-judgehost |& tee -a "$ARTIFACTS/make.log" | ||
section_end setup | ||
|
||
section_start "Configure chroot" | ||
|
||
cd /opt/domjudge/judgehost/bin || exit 1 | ||
section_end chroot | ||
|
||
section_start "Show minimal chroot" | ||
./dj_make_chroot -a "$ARCH" | tee -a "$ARTIFACTS"/chroot.log | ||
section_end | ||
|
||
section_start "Test chroot contents" | ||
set -xe | ||
cp ${DIR}/submit/assert.bash . | ||
cp ${DIR}/.github/jobs/chroot.bats . | ||
bats ./chroot.bats | ||
section_end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Chroot checks | ||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- main | ||
- '[0-9]+.[0-9]+' | ||
|
||
jobs: | ||
check-chroot-arch: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: domjudge/gitlabci:24.04 | ||
options: --privileged --cgroupns=host --init | ||
strategy: | ||
matrix: | ||
arch: [amd64, arm64, armhf, i386, default] | ||
steps: | ||
- name: Checkout current code | ||
uses: actions/checkout@v4 | ||
- name: Install DOMjudge | ||
run: | | ||
.github/jobs/chroot_checks.sh ${{ matrix.arch }} | ||
- name: Upload all logs/artifacts | ||
if: ${{ !cancelled() }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.arch }}-logs | ||
path: | | ||
/tmp/artifacts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.