Skip to content

Commit

Permalink
build.sh: Add support for meson dist
Browse files Browse the repository at this point in the history
For testing a release build.
Run it in CI.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
  • Loading branch information
pevik committed Feb 12, 2024
1 parent 1c08152 commit bfb13fe
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,11 @@ jobs:
- name: Show install log
run: ./build.sh install-log

- name: Run tests
- name: Tests
run: if [ ! "$SKIP_TESTS" ]; then ./build.sh test; else echo "tests skipped"; fi

- name: Show test log
run: ./build.sh test-log

- name: Dist
run: ./build.sh dist
14 changes: 13 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ install()
run "make install"
}

dist()
{
local formats="xztar,gztar,zip"

echo "=== dist ($formats) ==="
run "meson -C $BUILD_DIR $dist --formats $formats"
}

run_tests()
{
local ret
Expand Down Expand Up @@ -111,7 +119,7 @@ cd `dirname $0`

cmd=
case "$1" in
dependencies|info|configure|build|build-log|install|install-log|test|test-log|"") cmd="$1";;
build|build-log|configure|dependencies|dist|info|install|install-log|test|test-log|"") cmd="$1";;
*) echo "ERROR: wrong command '$1'" >&2; exit 1;;
esac

Expand Down Expand Up @@ -154,3 +162,7 @@ fi
if [ "$cmd" = "test-log" ]; then
print_log testlog.txt
fi

if [ "$cmd" = "dist" ]; then
dist
fi

0 comments on commit bfb13fe

Please sign in to comment.