Skip to content

fix(pycups): resolve architectural memory leaks in Connection_getPrinterAttributes #25

fix(pycups): resolve architectural memory leaks in Connection_getPrinterAttributes

fix(pycups): resolve architectural memory leaks in Connection_getPrinterAttributes #25

Workflow file for this run

name: C/C++ CI
on:
push:
branches: [ "master", "fix-issue-44-memory-leak" ]
pull_request:
branches: [ "master", "fix-issue-44-memory-leak" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: update build env
run: sudo apt-get update --fix-missing -y
- name: install prerequisities
run: sudo apt-get install libcups2-dev python3-dev gcc python3-setuptools
- name: make
run: make
- name: sudo make install
run: sudo make install
- name: fix permissions for dist
run: sudo chown -R $USER:$USER .
- name: make dist
run: make dist
- name: install cups and ippeveprinter for testing
run: sudo apt-get install cups cups-ipp-utils
- name: start cupsd - needed for testing
run: sudo systemctl start cups
- name: start ippeveprinter to simulate a driverless printer
run: |
mkdir -p /tmp/ippeve/spool/
nohup ippeveprinter -p 8000 -vvvv -s 10,0 -d "/tmp/ippeve/spool/" -k "test-ippeve" > /tmp/ippeve_log.txt 2>&1 &
# Wait up to 15 seconds for the port to open
for i in {1..15}; do
if grep -q "Listening" /tmp/ippeve_log.txt || nc -z 127.0.0.1 8000; then
echo "Mock Printer is UP and LISTENING"
break
fi
echo "Waiting for Printer... ($i/15)"
sleep 1
done
- name: install a permanent queue
run: sudo lpadmin -p test-permanent -v ipp://127.0.0.1:8000/ipp/print -m everywhere -E && sleep 5
- name: python3 test.py
run: python3 test.py