Skip to content

Commit

Permalink
[CI] run PKGBUIlD's function CHECK if env var CI_MAKEPKG_RUN_CHECK is…
Browse files Browse the repository at this point in the history
… set

This allows developpers to run the check function by simply defining the
fork's env variable CI_MAKEPKG_RUN_CHECK.

Rf.: How to set an environment variable for a repository:
https://docs.github.com/en/actions/learn-github-actions/variables#creating-configuration-variables-for-a-repository
  • Loading branch information
jannick0 committed Dec 25, 2023
1 parent bb640d7 commit 7d28dff
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .ci/ci-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,21 @@ pacman -R --recursive --unneeded --noconfirm --noprogressbar git python
# Enable linting
export MAKEPKG_LINT_PKGBUILD=1

# Run function CHECK if env var CI_MAKEPKG_RUN_CHECK is set (to any value)
if test "${CI_MAKEPKG_RUN_CHECK+set}" = set; then
MAKEPKG_RUN_CHECK_FLAG=''
else
MAKEPKG_RUN_CHECK_FLAG='--nocheck'
fi

message 'Building packages'
for package in "${packages[@]}"; do
echo "::group::[build] ${package}"
execute 'Clear cache' pacman -Scc --noconfirm
execute 'Fetch keys' "$DIR/fetch-validpgpkeys.sh"
cp -r ${package} B && cd B
message 'Building binary'
makepkg-mingw --noconfirm --noprogressbar --nocheck --syncdeps --rmdeps --cleanbuild || failure "${status} failed"
makepkg-mingw --noconfirm --noprogressbar --syncdeps --rmdeps --cleanbuild "${MAKEPKG_RUN_CHECK_FLAG}" || failure "${status} failed"
cd - > /dev/null
repo-add $PWD/artifacts/ci.db.tar.gz $PWD/B/*.pkg.tar.*
pacman -Sy
Expand Down

0 comments on commit 7d28dff

Please sign in to comment.