Skip to content

Commit

Permalink
GHA: bump codeql-action version (#42)
Browse files Browse the repository at this point in the history
* GHA: bump codeql-action version

And cleanup the workflow file.

* Cleanup publish-docs.yml

Some more cleanups.

* GHA: use the ubuntu-22.04 runner for all workflows

This is the current ubuntu-latest.

* GHA: more cleanups

Add some more cleanups.
  • Loading branch information
syncom authored Mar 27, 2024
1 parent 36cfc1f commit eb4f358
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 49 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/clang-sa.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Static analysis via clang static analyzer
name: "Clang Static Analysis"
name: 'Clang Static Analysis'

on:
push:
Expand All @@ -10,24 +10,26 @@ on:

jobs:
sacheck:
name: "Clang Static Analysis"
runs-on: ubuntu-latest
name: 'Clang Static Analysis'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-22.04]
defaults:
run:
shell: bash -euxo pipefail {0}
strategy:
fail-fast: false

steps:
- name: Checkout repository
- name: 'Checkout repository'
uses: actions/checkout@v4.1.1
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
submodules: 'recursive'

- name: Install dependencies
- name: 'Install dependencies'
run: |
sudo apt update
sudo apt install -y texinfo texlive-latex-extra
Expand All @@ -36,7 +38,7 @@ jobs:
sudo ln -sf /usr/bin/clang-check-14 /usr/bin/clang-check
# Run static analysis
- name: Run clang static analysis
- name: 'Run clang static analysis'
run: |
cd ${{ github.workspace }}
autoreconf -vi
Expand Down
44 changes: 10 additions & 34 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
name: 'CodeQL'

on:
push:
Expand All @@ -22,13 +11,13 @@ on:

jobs:
analyze:
name: Analyze
name: 'Analyze'
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
os: [ubuntu-22.04]
compiler_c: [gcc]
compiler_cxx: [g++]
language: [ 'cpp' ]
Expand All @@ -37,36 +26,23 @@ jobs:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
- name: 'Checkout repository'
uses: actions/checkout@v4.1.1

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
- name: 'Initialize CodeQL'
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Install dependencies
- name: 'Install build dependencies'
run: |
sudo apt-get update
sudo apt-get install -y texinfo
sudo apt-get install -y autotools-dev autoconf build-essential bear
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

# Use custom build process for C/C++
- name: Build
- name: 'Build'
env:
CC: ${{ matrix.compiler_c }}
CXX: ${{ matrix.compiler_cxx }}
Expand All @@ -75,5 +51,5 @@ jobs:
autoreconf -vi
./scripts/build.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: 'Perform CodeQL analysis'
uses: github/codeql-action/analyze@v2
6 changes: 1 addition & 5 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04]
#compiler_c: [clang]
#compiler_cxx: [clang++]
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
Expand All @@ -23,10 +21,8 @@ jobs:
sudo apt install -y texinfo
sudo apt install -y autotools-dev autoconf build-essential
- name: Publish docs
#env:
# CC: ${{ matrix.compiler_c }}
# CXX: ${{ matrix.compiler_cxx }}
run: |
set -euxo pipefail
cd ${{ github.workspace }}
autoreconf -vi
./scripts/publish-docs.sh
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
os: [ubuntu-22.04]
steps:
- name: Checkout code
uses: actions/checkout@v4.1.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sanity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
os: [ubuntu-22.04]
compiler_c: [gcc, clang]
compiler_cxx: [g++, clang++]
steps:
Expand Down

0 comments on commit eb4f358

Please sign in to comment.