Skip to content

Commit e3054cd

Browse files
committed
ci: Update rpm testsuite to current master
Also updates the GH actions versions to latest ones. Signed-off-by: Jakub Jelen <[email protected]>
1 parent 29545a4 commit e3054cd

1 file changed

Lines changed: 25 additions & 46 deletions

File tree

.github/workflows/ci.yml

Lines changed: 25 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ env:
88
jobs:
99
codespell:
1010
name: Codespell
11-
runs-on: ubuntu-22.04
11+
runs-on: ubuntu-latest
1212
steps:
1313
- name: Setup | Checkout rpm-sequoia
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v4
1515
- name: Setup | Dependencies
1616
run: sudo apt update && sudo apt install codespell
1717
- name: Codespell
@@ -22,12 +22,12 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- name: Setup | Checkout rpm-sequoia
25-
uses: actions/checkout@v2
25+
uses: actions/checkout@v4
2626
with:
2727
fetch-depth: 0
2828

2929
- name: Setup | Build Cache rpm-sequoia
30-
uses: actions/cache@v3
30+
uses: actions/cache@v4
3131
with:
3232
path: |
3333
~/.cargo/bin/
@@ -55,12 +55,12 @@ jobs:
5555
needs: ["Compile"]
5656
steps:
5757
- name: Setup | Checkout rpm-sequoia
58-
uses: actions/checkout@v2
58+
uses: actions/checkout@v4
5959
with:
6060
fetch-depth: 0
6161

6262
- name: Setup | Build Cache rpm-sequoia
63-
uses: actions/cache@v3
63+
uses: actions/cache@v4
6464
with:
6565
path: |
6666
~/.cargo/bin/
@@ -85,12 +85,12 @@ jobs:
8585
needs: ["Compile"]
8686
steps:
8787
- name: Setup | Checkout rpm-sequoia
88-
uses: actions/checkout@v2
88+
uses: actions/checkout@v4
8989
with:
9090
fetch-depth: 0
9191

92-
- name: Setup | Build Cache rpm-sequoia
93-
uses: actions/cache@v3
92+
- name: Setup | Build Cache Rust dependencies
93+
uses: actions/cache@v4
9494
with:
9595
path: |
9696
~/.cargo/bin/
@@ -107,23 +107,16 @@ jobs:
107107
run: cargo build
108108

109109
- name: Setup | rpm Dependencies
110-
run: sudo apt install automake autoconf autopoint gettext libtool tar zlib1g-dev libpopt-dev libsqlite3-dev liblua5.4-dev fakechroot libarchive-dev libmagic-dev
110+
run: |
111+
sudo apt install podman
111112
112113
- name: Setup | Checkout rpm
113-
uses: actions/checkout@v2
114+
uses: actions/checkout@v4
114115
with:
115116
repository: rpm-software-management/rpm.git
116-
ref: rpm-4.18.x
117+
ref: master
117118
fetch-depth: 1
118-
path: rpm-pristine
119-
120-
- name: Setup | Build Cache rpm
121-
uses: actions/cache@v3
122-
with:
123-
path: |
124-
rpm/
125-
rpm-build/
126-
key: ${{ runner.os }}-rpm-${{ hashFiles('rpm-pristine/.git/HEAD', 'rpm-pristine/.git/refs/heads/master') }}
119+
path: rpm
127120

128121
- name: Test | rpm
129122
run: |
@@ -141,36 +134,22 @@ jobs:
141134
exit 1
142135
fi
143136
144-
echo "::group::configure"
145-
146-
# If rpm doesn't exist, then we don't have a cache of an
147-
# rpm build.
148-
if ! test -e rpm
149-
then
150-
cp -a rpm-pristine rpm
151-
152-
cd rpm
153-
autoreconf -is
154-
cd ..
155-
156-
mkdir -p rpm-build
157-
cd rpm-build
158-
../rpm/configure --prefix=/ --with-crypto=sequoia
159-
else
160-
cd rpm-build
161-
fi
162-
echo "::endgroup::"
163-
164-
echo "::group::make"
165-
make
166-
echo "::endgroup::"
167-
168137
echo "::group::make check"
138+
cd rpm
139+
RPM_ROOT=$(pwd)
169140
cd tests
170-
if ! make check TESTSUITEFLAGS="-k OpenPGP -k signature -k rpmkeys -k digest"
141+
./mktree.oci build
142+
# run the tests by overriding the librpm-sequoia in the container.
143+
IMAGE_ID=$(cat mktree.cache/image-id)
144+
podman run --privileged -it --rm --read-only --tmpfs /tmp -v $RPM_ROOT:/srv:z \
145+
-v $LD_LIBRARY_PATH/librpm_sequoia.so:/usr/lib64/librpm_sequoia.so:z \
146+
--workdir /srv -e ROOTLESS=1 $IMAGE_ID \
147+
rpmtests -k OpenPGP -k signature -k rpmkeys -k digest
148+
if [ "$?" != 0 ];
171149
then
172150
echo "::endgroup::"
173151
152+
cd ..
174153
for log in rpmtests.dir/*/rpmtests.log
175154
do
176155
echo "::group::$log"

0 commit comments

Comments
 (0)