Skip to content

Commit

Permalink
Merge pull request #6 from theavege/fix/ci
Browse files Browse the repository at this point in the history
Fix/ci
  • Loading branch information
Nenirey authored Dec 14, 2024
2 parents bf34eb3 + 9638676 commit 9a19674
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 66 deletions.
1 change: 1 addition & 0 deletions .github/workflows/make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
pull_request:
branches:
- master
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.so

# Unit test / coverage reports
use/*/
htmlcov/
.tox/
.coverage
Expand All @@ -27,3 +28,4 @@ docs/_build/
*.bak
*.ppu
*.old
**.compiled
19 changes: 0 additions & 19 deletions clean.sh

This file was deleted.

63 changes: 42 additions & 21 deletions make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,58 @@ Options:
EOF
)

function priv_clean
(
# Clean up all temporary files
find . -iname '*.compiled' -delete
find . -iname '*.ppu' -delete
find . -iname '*.o' -delete
find src/ -iname '*.bak' -delete
find src/ -iname '*.or' -delete

rm -f src/lazview.res lazview
rm -f tools/extractdwrflnfo
rm -rf src/lib
rm -rf src/backup
rm -r units/*
rm -f src/versionitis
)

function priv_lazbuild
(
if ! (which lazbuild); then
source '/etc/os-release'
case ${ID:?} in
debian | ubuntu)
sudo apt-get update
sudo apt-get install -y lazarus
sudo apt-get install -y lazarus{-ide-qt5,}
;;
esac
fi
if [[ -f 'use/components.txt' ]]; then
git submodule update --init --recursive
git submodule update --recursive --remote
while read -r; do
if [[ -n "${REPLY}" ]] &&
! (lazbuild --verbose-pkgsearch "${REPLY}") &&
! (lazbuild --add-package "${REPLY}") &&
! [[ -e "use/${REPLY}" ]]; then
declare -A VAR=(
[url]="https://packages.lazarus-ide.org/${REPLY}.zip"
[out]=$(mktemp)
)
wget --output-document "${VAR[out]}" "${VAR[url]}" 2>/dev/null
unzip -o "${VAR[out]}" -d "use/${REPLY}"
rm --verbose "${VAR[out]}"
fi
done < 'use/components.txt'
find 'use' -type 'f' -name '*.lpk' -exec lazbuild --add-package-link {} +
declare -r COMPONENTS='use/components.txt'
if [[ -d "${COMPONENTS%%/*}" ]]; then
git submodule update --init --recursive --force --remote
if [[ -f "${COMPONENTS}" ]]; then
while read -r; do
if [[ -n "${REPLY}" ]] &&
! (lazbuild --verbose-pkgsearch "${REPLY}") &&
! (lazbuild --add-package "${REPLY}") &&
! [[ -d "${COMPONENTS%%/*}/${REPLY}" ]]; then
declare -A VAR=(
[url]="https://packages.lazarus-ide.org/${REPLY}.zip"
[out]=$(mktemp)
)
wget --output-document "${VAR[out]}" "${VAR[url]}" >/dev/null
unzip -o "${VAR[out]}" -d "${COMPONENTS%%/*}/${REPLY}"
rm --verbose "${VAR[out]}"
fi
done < "${COMPONENTS}"
fi
find "${COMPONENTS%%/*}" -type 'f' -name '*.lpk' -exec \
lazbuild --add-package-link {} +
fi
find 'src' -type 'f' -name '*.lpi' \
-exec lazbuild --no-write-project --recursive --no-write-project --build-mode=release {} + 1>&2
find 'src' -type 'f' -name '*.lpi' -exec \
lazbuild --no-write-project --recursive --no-write-project --widgetset=qt5 --build-mode=release {} + 1>&2
)

function priv_main
Expand All @@ -49,6 +69,7 @@ function priv_main
if ((${#})); then
case ${1} in
build) priv_lazbuild ;;
clean) priv_clean ;;
*) priv_clippit ;;
esac
else
Expand Down
Binary file removed src/lazview.res
Binary file not shown.
5 changes: 0 additions & 5 deletions use/PasLibVlc/Lazarus/Makefile.compiled

This file was deleted.

5 changes: 0 additions & 5 deletions use/PasLibVlc/Lazarus/PasLibVlcPlayer.compiled

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions use/vlc/lib/x86_64-linux/lazvlc.compiled

This file was deleted.

0 comments on commit 9a19674

Please sign in to comment.