Skip to content

NNTP Proxy/Server Core: Initial Implementation (Server.go) #103

NNTP Proxy/Server Core: Initial Implementation (Server.go)

NNTP Proxy/Server Core: Initial Implementation (Server.go) #103

Workflow file for this run

name: "CodeQL Advanced"
on:
push:
branches:
- main
- testing
tags:
- testing
release:
types: [published]
workflow_dispatch:
repository_dispatch:
pull_request:
branches:
- main
- testing
schedule:
- cron: '30 05 * * 1'
jobs:
analyze:
name: Analyze (${{ matrix.runner_name }}-${{ matrix.language }})
runs-on: ${{ matrix.runner }}
timeout-minutes: 60
permissions:
security-events: write
packages: read
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
# GitHub hosted runners only
- language: go
build-mode: autobuild
runner: ubuntu-22.04
runner_name: "GH-ubuntu-22.04"
ram: 6
cache: true
- language: go
build-mode: autobuild
runner: ubuntu-24.04
runner_name: "GH-ubuntu-24.04"
ram: 6
cache: true
- language: go
build-mode: autobuild
runner: ubuntu-latest
runner_name: "GH-ubuntu-latest"
ram: 6
cache: true
# C/C++ analysis for rapidyenc
- language: c-cpp
build-mode: manual
runner: ubuntu-latest
runner_name: "GH-ubuntu-latest"
ram: 6
cache: true
# Actions analysis
- language: actions
build-mode: none
runner: ubuntu-latest
runner_name: "GH-ubuntu-latest"
ram: 6
cache: true
steps:
- name: Show actor
run: echo "Triggered by ${{ github.actor }}"
# Block unallowed push users
- name: Block unallowed push user
if: github.event_name == 'push' && github.actor != 'go-while'
run: |
echo "Push not allowed for user ${{ github.actor }}"
exit 1
# Block unallowed PR users
- name: Block unallowed PR user
if: github.event_name == 'pull_request' && github.event.pull_request.user.login != 'go-while'
run: |
echo "Pull request not allowed for user ${{ github.event.pull_request.user.login }}"
exit 1
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install build dependencies
if: matrix.language == 'c-cpp'
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake ca-certificates curl git dpkg-dev wget
- name: Set up Go
if: matrix.language == 'go'
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: ${{ matrix.cache }}
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
queries: security-extended,security-and-quality
ram: ${{ matrix.ram }}
- name: Autobuild
if: matrix.language == 'go' && matrix.build-mode == 'autobuild'
# Run the autobuild step only for Go jobs
uses: github/codeql-action/autobuild@v3
- name: Build (manual, for C/C++)
if: matrix.language == 'c-cpp' && matrix.build-mode != 'autobuild'
# Run the build step only for C/C++ jobs
timeout-minutes: 10
run: |
cd rapidyenc
if [ ! -e rapidyenc ]; then
./clone_rapidyenc.sh
if [ ! -e rapidyenc/.git ]; then
echo "rapidyenc/ src not found, exiting"
exit 1
fi
else
echo "rapidyenc/ src exists, skipping clone"
fi
./build_rapidyenc_linux-amd64.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3