Skip to content

Commit

Permalink
(fix) Remove Codacy, use CodeQL
Browse files Browse the repository at this point in the history
Update checks in CI on README.md. Remove extra whitespace.
  • Loading branch information
acgetchell committed Mar 5, 2022
1 parent 424e822 commit 7e8d325
Show file tree
Hide file tree
Showing 6 changed files with 123 additions and 61 deletions.
60 changes: 0 additions & 60 deletions .github/workflows/codacy.yml

This file was deleted.

80 changes: 80 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# 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"

on:
push:
branches: [ develop ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ develop ]
schedule:
- cron: '26 7 * * 0'
workflow_dispatch:

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'cpp', 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# 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
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
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

- name: Setup GCC
uses: egor-tensin/setup-gcc@v1
with:
version: 11
platform: x64

- name: Setup
run: |
sudo apt update
sudo apt-get install build-essential ninja-build ccache
- name: Restore artifacts, or setup vcpkg
uses: lukka/run-vcpkg@v10
with:
vcpkgGitCommitId: bd602277bf7fc3188b3d086b302c6840464db900

- name: Install vcpkgs and configure CMake
shell: bash
run: |
vcpkg install --feature-flags=manifests
cmake -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo -S . -B build
- name: Build
run: cmake --build build

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
38 changes: 38 additions & 0 deletions .github/workflows/linux-gcc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Linux GCC

on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true

- name: Setup GCC
uses: egor-tensin/setup-gcc@v1
with:
version: 11
platform: x64

- name: Setup
run: |
sudo apt update
sudo apt-get install build-essential ninja-build ccache
- name: Restore artifacts, or setup vcpkg
uses: lukka/run-vcpkg@v10
with:
vcpkgGitCommitId: bd602277bf7fc3188b3d086b302c6840464db900

- name: Install vcpkg packages and configure CMake
shell: bash
run: |
vcpkg install --feature-flags=manifests
cmake -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo -D ENABLE_TESTING:BOOL=TRUE -S . -B build
- name: Build
run: cmake --build build
1 change: 1 addition & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ jobs:
run: |
vcpkg install --feature-flags=manifests
cmake -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo -S . -B build
- name: Build
run: cmake --build build
3 changes: 2 additions & 1 deletion .github/workflows/windows-msvc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Windows

on: [workflow_dispatch]
on: push, pull_request, [workflow_dispatch]

jobs:
build:
Expand All @@ -27,5 +27,6 @@ jobs:
run: |
vcpkg install --feature-flags=manifests
cmake -D CMAKE_BUILD_TYPE=RelWithDebInfo -S . -B build
- name: Build
run: cmake --build build
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# causal-sets-explorer
[![Linux Clang](https://github.com/acgetchell/causal-sets-explorer/actions/workflows/linux-clang.yml/badge.svg)](https://github.com/acgetchell/causal-sets-explorer/actions/workflows/linux-clang.yml)
[![macOS](https://github.com/acgetchell/causal-sets-explorer/actions/workflows/macos.yml/badge.svg)](https://github.com/acgetchell/causal-sets-explorer/actions/workflows/macos.yml)
[![Windows](https://github.com/acgetchell/causal-sets-explorer/actions/workflows/windows-msvc.yml/badge.svg)](https://github.com/acgetchell/causal-sets-explorer/actions/workflows/windows-msvc.yml)

[Causal sets][causets] explorer will eventually perform graph-theoretic calculations on Causal sets.

Expand Down

0 comments on commit 7e8d325

Please sign in to comment.