Verified Commit 7bbd9a1a authored by Jordan Petridis's avatar Jordan Petridis 🌱

Update the test script

parent 0dfb4859
Pipeline #25621 passed with stages
in 20 minutes and 42 seconds
......@@ -28,13 +28,12 @@ flatpak:
- |
xvfb-run -a -s "-screen 0 1024x768x24" \
flatpak-builder --run \
--env=CARGO_HOME="target/cargo-home/" \
--env=RUSTFLAGS="--cfg rayon_unstable" \
--env=CARGO_HOME="target/cargo-home" \
--env=CARGO_TARGET_DIR="target_test/" \
app ${MANIFEST_PATH} \
cargo test -- --test-threads=1
# - flatpak-builder --run app ${MANIFEST_PATH} cargo test -- --test-threads=1 --ignored
# Create a flatpak bundle
- flatpak-builder --finish-only app ${MANIFEST_PATH}
- flatpak build-export repo app
......@@ -50,6 +49,7 @@ flatpak:
paths:
- .flatpak-builder/cache/
- target/
- target_test/
review:
stage: review
......
......@@ -11,4 +11,4 @@ then
else
echo "RELEASE MODE"
cargo build --release -p podcasts-gtk && cp $1/target/release/podcasts-gtk $2
fi
fi
\ No newline at end of file
#! /usr/bin/sh
file="/.flatpak-info"
if [ -f "$file" ]
then
# If you open a build terminal with gnome-builder
source /usr/lib/sdk/rust-stable/enable.sh
export CARGO_HOME=target/cargo-home/
fi
export MANIFEST_PATH="org.gnome.Podcasts.json"
export RUNTIME_REPO="https://sdk.gnome.org/gnome-nightly.flatpakrepo"
export FLATPAK_MODULE="gnome-podcasts"
export CONFIGURE_ARGS=""
export DBUS_ID="org.gnome.Podcasts"
export BUNDLE="org.gnome.Podcasts.Devel.flatpak"
export RUSTFLAGS="--cfg rayon_unstable"
export RUSTBACKTRACE="1"
flatpak-builder --stop-at=${FLATPAK_MODULE} --keep-build-dirs --force-clean app ${MANIFEST_PATH}
# https://gitlab.gnome.org/World/podcasts/issues/55
# Force regeneration of gresources regardless of artifacts chage
flatpak-builder --run app ${MANIFEST_PATH} glib-compile-resources --sourcedir=podcasts-gtk/resources/ podcasts-gtk/resources/resources.xml
rustc --version
cargo --version
# cargo fmt --version
# Build the flatpak repo
flatpak-builder --run app ${MANIFEST_PATH} meson --prefix=/app build
flatpak-builder --run app ${MANIFEST_PATH} ninja -C build install
cargo build --all && \
# cargo test -- --test-threads=1 && \
cargo test -- --test-threads=1 --ignored
# Run the tests
xvfb-run -a -s "-screen 0 1024x768x24" \
flatpak-builder --run \
--env=RUSTFLAGS="--cfg rayon_unstable" \
--env=CARGO_HOME="target/cargo-home" \
--env=CARGO_TARGET_DIR="target_test/" \
app ${MANIFEST_PATH} \
cargo test -- --test-threads=1
# Rustfmt from the flatpak bundle tends to be outdated,
# will probably get better when rustfmt stabilizes
# cargo fmt --all -- --write-mode=diff
# cargo bench large
# Create a flatpak bundle
# flatpak-builder --finish-only app ${MANIFEST_PATH}
# flatpak build-export repo app
# flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${DBUS_ID}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment