File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CodeQL
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ pull_request :
7+ branches : [ master ]
8+
9+ jobs :
10+ analyze :
11+ name : Analyze (C/C++)
12+ runs-on : ubuntu-latest
13+
14+ permissions :
15+ actions : read
16+ contents : read
17+ security-events : write
18+
19+ strategy :
20+ fail-fast : false
21+ matrix :
22+ language : [ 'cpp' ]
23+
24+ steps :
25+ - name : Checkout repository
26+ uses : actions/checkout@v4
27+
28+ - name : Initialize CodeQL
29+ uses : github/codeql-action/init@v4
30+ with :
31+ languages : ${{ matrix.language }}
32+ queries : +security-and-quality
33+
34+ - name : Install dependencies
35+ run : |
36+ sudo apt-get update
37+ sudo apt-get install -y \
38+ build-essential \
39+ autoconf \
40+ automake \
41+ autopoint \
42+ libtool \
43+ pkg-config \
44+ git \
45+ libjpeg-dev \
46+ libpng-dev \
47+ zlib1g-dev \
48+ libcupsfilters-dev \
49+ libavahi-client-dev \
50+ libcups2-dev
51+
52+ - name : Install CUPS (latest)
53+ run : |
54+ git clone https://github.com/OpenPrinting/cups.git
55+ cd cups
56+ ./configure
57+ make -j$(nproc)
58+ sudo make install
59+ sudo ldconfig
60+
61+ - name : Export CUPS paths
62+ run : |
63+ echo "/usr/local/bin" >> $GITHUB_PATH
64+ echo "/usr/local/sbin" >> $GITHUB_PATH
65+
66+ - name : Install PAPPL and Build project
67+ run : |
68+
69+ # Install PAPPL
70+ git clone https://github.com/michaelrsweet/pappl.git
71+ cd pappl
72+ ./configure --enable-shared
73+ make -j$(nproc)
74+ sudo make install
75+ sudo ldconfig
76+ cd ..
77+
78+ echo "PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig" >> $GITHUB_ENV
79+
80+ export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig
81+
82+ # Verify PAPPL
83+ pkg-config --modversion pappl
84+
85+ # Build project
86+ ./autogen.sh || true
87+ ./configure CUPS_CONFIG=/usr/local/bin/cups-config
88+ make -j$(nproc)
89+
90+ - name : Perform CodeQL Analysis
91+ uses : github/codeql-action/analyze@v4
92+ with :
93+ category : " /language:${{ matrix.language }}"
94+
You can’t perform that action at this time.
0 commit comments