mirror of
https://github.com/libssh2/libssh2.git
synced 2026-10-24 03:48:58 +03:00
- update `actions/cache` from 5.0.4 to 5.0.5 - update `actions/upload-artifact` from 7.0.0 to 7.0.1 - update `docker/build-push-action` from 7.0.0 to 7.1.0 - update `docker/login-action` from 4.0.0 to 4.1.0 - update `github/codeql-action` from 4.31.9 to 4.35.2 - update `msys2/setup-msys2` from 2.31.0 to 2.31.1 Closes #1922
100 lines
3.1 KiB
YAML
100 lines
3.1 KiB
YAML
# Copyright (C) The libssh2 project and its contributors.
|
|
#
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
name: 'CodeQL'
|
|
|
|
'on':
|
|
push:
|
|
branches:
|
|
- master
|
|
- '*/ci'
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- '*/ci'
|
|
schedule:
|
|
- cron: '0 0 * * 4'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
permissions: {}
|
|
|
|
env:
|
|
DO_NOT_TRACK: '1'
|
|
|
|
jobs:
|
|
gha:
|
|
if: ${{ github.repository_owner == 'libssh2' || github.event_name != 'schedule' }}
|
|
name: 'GHA'
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
security-events: write # To create/update security events
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: 'initialize'
|
|
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
|
|
with:
|
|
languages: actions
|
|
queries: security-extended
|
|
|
|
- name: 'perform analysis'
|
|
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
|
|
|
|
c:
|
|
if: ${{ github.repository_owner == 'libssh2' || github.event_name != 'schedule' }}
|
|
name: 'C'
|
|
runs-on: ${{ matrix.platform == 'Linux' && 'ubuntu-latest' || 'windows-2022' }}
|
|
permissions:
|
|
security-events: write # To create/update security events
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform: [Linux, Windows]
|
|
env:
|
|
MATRIX_PLATFORM: '${{ matrix.platform }}'
|
|
steps:
|
|
- name: 'install prereqs'
|
|
if: ${{ matrix.platform == 'Linux' }}
|
|
timeout-minutes: 5
|
|
run: |
|
|
sudo find /etc/apt/sources.list.d -type f -not -name 'ubuntu.sources' -delete -print
|
|
sudo apt-get -o Dpkg::Use-Pty=0 update
|
|
sudo apt-get -o Dpkg::Use-Pty=0 install zlib1g-dev libssl-dev libgcrypt-dev libwolfssl-dev
|
|
/home/linuxbrew/.linuxbrew/bin/brew install mbedtls@3
|
|
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: 'initialize'
|
|
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
|
|
with:
|
|
languages: cpp
|
|
build-mode: manual
|
|
trap-caching: false
|
|
|
|
- name: 'build'
|
|
timeout-minutes: 5
|
|
shell: bash
|
|
run: |
|
|
if [ "${MATRIX_PLATFORM}" = 'Windows' ]; then
|
|
cmake -B . -DCRYPTO_BACKEND=WinCNG -DCMAKE_VS_GLOBALS=TrackFileAccess=false
|
|
cmake --build . --verbose
|
|
else
|
|
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
|
export PKG_CONFIG_PATH; PKG_CONFIG_PATH="$(brew --prefix mbedtls@3)/lib/pkgconfig"
|
|
for crypto in OpenSSL Libgcrypt mbedTLS wolfSSL; do
|
|
cmake -B _bld-"${crypto}" -G Ninja -DCRYPTO_BACKEND="${crypto}" -DENABLE_ZLIB_COMPRESSION=ON
|
|
cmake --build _bld-"${crypto}" --verbose
|
|
done
|
|
fi
|
|
|
|
- name: 'perform analysis'
|
|
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2
|