Skip to content

Commit 656a7bb

Browse files
committed
Fixing codeql workflow, using static libipc3270 to avoid dependency.
1 parent 740f228 commit 656a7bb

2 files changed

Lines changed: 72 additions & 29 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 70 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,81 @@
1-
---
2-
name: CodeQL
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL Advanced"
13+
314
on:
415
push:
5-
branches:
6-
- develop
7-
- master
16+
branches: [ "master", "develop" ]
17+
pull_request:
18+
branches: [ "master" ]
19+
820
jobs:
921
analyze:
10-
name: Analyze
11-
runs-on: ubuntu-22.04
22+
name: Analyze (${{ matrix.language }})
23+
# Runner size impacts CodeQL analysis time. To learn more, please see:
24+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
25+
# - https://gh.io/supported-runners-and-hardware-resources
26+
# - https://gh.io/using-larger-runners (GitHub.com only)
27+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
28+
runs-on: 'ubuntu-24.04'
1229
permissions:
30+
# required for all workflows
31+
security-events: write
32+
33+
# required to fetch internal or private CodeQL packs
34+
packages: read
35+
36+
# only required for workflows in private repositories
1337
actions: read
1438
contents: read
15-
security-events: write
39+
1640
strategy:
1741
fail-fast: false
1842
matrix:
19-
language:
20-
- cpp
43+
include:
44+
- language: c-cpp
45+
build-mode: autobuild
46+
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
47+
# Use `c-cpp` to analyze code written in C, C++ or both
48+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
49+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
50+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
51+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
52+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
53+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
2154
steps:
22-
- name: Checkout
23-
uses: actions/checkout@v3
24-
- name: Install Packages
25-
run: |
26-
echo 'deb http://download.opensuse.org/repositories/home:/PerryWerneck:/pw3270/xUbuntu_22.04/ /' | sudo tee /etc/apt/sources.list.d/home:PerryWerneck:pw3270.list
27-
curl -fsSL https://download.opensuse.org/repositories/home:PerryWerneck:pw3270/xUbuntu_22.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_PerryWerneck_pw3270.gpg > /dev/null
28-
sudo apt-get update
29-
sudo apt-get install --yes git make autopoint autotools-dev autoconf automake gettext libipc3270-dev
30-
- name: Initialize CodeQL
31-
uses: github/codeql-action/init@v2
32-
with:
33-
languages: ${{ matrix.language }}
34-
queries: +security-and-quality
35-
- name: Autobuild
36-
uses: github/codeql-action/autobuild@v2
37-
- name: Perform CodeQL Analysis
38-
uses: github/codeql-action/analyze@v2
39-
with:
40-
category: /language:${{ matrix.language }}
55+
- name: Checkout repository
56+
uses: actions/checkout@v4
57+
58+
- name: Install Packages
59+
run: |
60+
echo 'deb http://download.opensuse.org/repositories/home:/PerryWerneck:/pw3270/xUbuntu_24.04/ /' | sudo tee /etc/apt/sources.list.d/home:PerryWerneck:pw3270.list
61+
curl -fsSL https://download.opensuse.org/repositories/home:PerryWerneck:pw3270/xUbuntu_24.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_PerryWerneck_pw3270.gpg > /dev/null
62+
sudo apt update
63+
sudo apt install --yes meson pkg-config pkg-config gettext libipc3270-dev
64+
65+
# Initializes the CodeQL tools for scanning.
66+
# Initializes the CodeQL tools for scanning.
67+
- name: Initialize CodeQL
68+
uses: github/codeql-action/init@v3
69+
with:
70+
languages: ${{ matrix.language }}
71+
72+
- name: Build the code
73+
run: |
74+
meson setup --prefix=/usr .build
75+
meson compile -C .build
76+
77+
- name: Perform CodeQL Analysis
78+
uses: github/codeql-action/analyze@v3
79+
with:
80+
category: "/language:${{matrix.language}}"
81+

meson.build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ add_project_arguments(cxx.get_supported_arguments(compiler_flags_common), langua
6565
ipc3270 = dependency(
6666
'libipc3270',
6767
required: true,
68+
static: true,
69+
version: '>= 5.5.0',
6870
fallback: [
6971
'libipc3270',
7072
'static_library'

0 commit comments

Comments
 (0)