Skip to content

Commit 32bc15b

Browse files
committed
Build example test release for configure/make tests
Bats testing now works from another directory
1 parent 81ef797 commit 32bc15b

File tree

3 files changed

+56
-32
lines changed

3 files changed

+56
-32
lines changed

.github/jobs/configure-checks/setup_configure_image.sh

+3-6
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,14 @@ distro_id=$(grep "^ID=" /etc/os-release)
77
# Install everything for configure and testing
88
case $distro_id in
99
"ID=fedora")
10-
dnf install pkg-config make bats autoconf automake util-linux -y ;;
10+
dnf install make bats util-linux -y ;;
1111
*)
1212
apt-get update; apt-get full-upgrade -y
13-
apt-get install pkg-config make bats autoconf -y ;;
13+
apt-get install make bats -y ;;
1414
esac
1515

16-
# Build the configure file
17-
make configure
18-
1916
# Install extra assert statements for bots
2017
cp submit/assert.bash .github/jobs/configure-checks/
2118

2219
# Run the configure tests for this usecase
23-
test_path="/__w/domjudge/domjudge" bats .github/jobs/configure-checks/all.bats
20+
test_path="/__w/domjudge/domjudge/release" bats .github/jobs/configure-checks/all.bats

.github/workflows/autoconf-check-different-distro.yml

-23
This file was deleted.

.github/workflows/autoconf-check.yml

+53-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,52 @@ on:
77
- '[0-9]+.[0-9]+'
88

99
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
container:
13+
image: domjudge/gitlabci:24.04
14+
steps:
15+
- name: Checkout Code
16+
uses: actions/checkout@v3
17+
- name: Create the distribution tarball
18+
run: |
19+
make dist
20+
make distclean
21+
cd ..
22+
mv domjudge release
23+
mkdir domjudge #Workdir for next steps
24+
tar -cf release.tar release
25+
gzip -9 release.tar
26+
mv release.tar.gz domjudge/
27+
- name: Upload Artifact
28+
uses: actions/upload-artifact@v4
29+
with:
30+
compression-level: 0
31+
name: test-tarball
32+
path: ${{ github.workspace }}/release.tar.gz
33+
34+
redhat-family:
35+
needs: build
36+
strategy:
37+
matrix:
38+
version: [latest]
39+
os: [fedora]
40+
runs-on: ubuntu-latest
41+
container:
42+
image: ${{ matrix.os }}:${{ matrix.version }}
43+
steps:
44+
- name: Download Artifact
45+
uses: actions/download-artifact@v4
46+
with:
47+
name: test-tarball
48+
- name: Unpack the "Release" tarball
49+
run: tar xvf release.tar.gz
50+
- name: Setup image and run bats tests
51+
working-directory: release
52+
run: .github/jobs/configure-checks/setup_configure_image.sh
53+
1054
debian-family:
55+
needs: build
1156
strategy:
1257
matrix:
1358
version: [jammy, focal, rolling]
@@ -28,8 +73,13 @@ jobs:
2873
container:
2974
image: ${{ matrix.os }}:${{ matrix.version }}
3075
steps:
31-
- name: Install git so we get the .github directory
32-
run: apt-get update; apt-get install -y git
33-
- uses: actions/checkout@v4
76+
- name: Download Artifact
77+
uses: actions/download-artifact@v4
78+
with:
79+
name: test-tarball
80+
- name: Unpack the "Release" tarball
81+
run: tar xvf release.tar.gz
3482
- name: Setup image and run bats tests
83+
working-directory: release
3584
run: .github/jobs/configure-checks/setup_configure_image.sh
85+

0 commit comments

Comments
 (0)