Fix test-emulated-raspios-arm-x64 ci cache

This commit is contained in:
lepapareil 2022-05-20 14:26:13 +02:00 committed by lepapareil
parent 77195dfc4b
commit b162a79a9c

View File

@ -290,7 +290,8 @@ jobs:
target
venv
root
key: ${{ runner.os }}-test-emulated-raspios-arm-x64
key: ${{ runner.os }}-test-emulated-raspios-arm-x64-${{ github.sha }}
restore-keys: ${{ runner.os }}-test-emulated-raspios-arm-x64-
- uses: pguyot/arm-runner-action@v2
with:
cpu: cortex-a53
@ -302,29 +303,26 @@ jobs:
set -eu
uname -a ; uname -m ; lsb_release -a
# read cache
chown root:root /hurl/target /hurl/venv /root || true
chmod -R 777 /hurl/target /hurl/venv /root || true
cp -fr /hurl/root/* /root/ || true
rm -fr /hurl/root || true
for dir in /hurl/target /hurl/venv /hurl/root ; do [ -d "${dir}" ] && chown root:root "${dir}" && chmod -R 777 "${dir}" ; done
for dir in .rustup .cargo ; do [ -d "/hurl/root/${dir}" ] && cp -fr "/hurl/root/${dir}" "/root/${dir}" && rm -fr "/hurl/root/${dir}" ; done
echo "# init fastest build"
mkdir -p /hurl/.cargo
echo '[target.aarch64-unknown-linux-gnu]' > /hurl/.cargo/config.toml
echo 'linker = "clang"' >> ./.cargo/config.toml
echo 'linker = "clang"' >> /hurl/.cargo/config.toml
echo 'rustflags = ["-Clink-arg=-fuse-ld=lld"]' >> /hurl/.cargo/config.toml
cat /hurl/.cargo/config.toml
echo "# Install build prerequistes"
apt -qq --silent update
apt -qq --silent install -y clang lld build-essential pkg-config libssl-dev libcurl4-openssl-dev libxml2-dev libxml2-utils python3 python3-pip python3-venv
echo "# Execute tests"
[ ! -d "/hurl/venv" ] && python3 -m venv /hurl/venv
. /hurl/venv/bin/activate ; which python3
. /hurl/venv/bin/activate
python3 -m pip install pip --upgrade
./ci/install_rust_latest.sh
echo "# Execute tests"
./ci/build_and_test.sh
echo "# pre-write cache"
cp -fr /root /hurl/root || true
chown root:root /hurl/target /hurl/venv /hurl/root || true
chmod -R 777 /hurl/target /hurl/venv /hurl/root || true
mkdir -p /hurl/root
for dir in .rustup .cargo ; do [ -d "/root/${dir}" ] && cp -fr "/root/${dir}" "/hurl/root/${dir}" ; done
for dir in /hurl/target /hurl/venv /hurl/root ; do [ -d "${dir}" ] && chown root:root "${dir}" && chmod -R 777 "${dir}" ; done
test-windows-x64:
runs-on: windows-latest
@ -399,4 +397,4 @@ jobs:
name: tests-win64-${{ matrix.rust }}-artifacts
path: |
integration/server.log
integration/server-ssl.log
integration/server-ssl.log