Skip to content

draft: macos test #253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Query filters to include or exclude specific queries
query-filters:
- exclude:
# See: https://codeql.github.com/codeql-query-help/cpp/cpp-short-global-name/
id: cpp/short-global-name
- exclude:
# See: https://codeql.github.com/codeql-query-help/cpp/cpp-commented-out-code/
id: cpp/commented-out-code
- exclude:
# See: https://codeql.github.com/codeql-query-help/cpp/cpp-poorly-documented-function/
id: cpp/poorly-documented-function
- exclude:
# See: https://codeql.github.com/codeql-query-help/cpp/cpp-trivial-switch/
id: cpp/trivial-switch
- exclude:
# See: https://codeql.github.com/codeql-query-help/cpp/cpp-irregular-enum-init/
id: cpp/irregular-enum-init
- exclude:
# See: https://codeql.github.com/codeql-query-help/cpp/cpp-guarded-free/
id: cpp/guarded-free

# Directories to scan for vulnerabilities
paths:
- src

# Directories and files to ignore during the scan
paths-ignore:
- scripts
- examples
- docs
- benchmark
119 changes: 119 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# 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 Advanced"

env:
CMAKE_POLICY_VERSION_MINIMUM: 3.5

on:
push:
branches: [ "stable", "develop" ]
pull_request:
branches: [ "stable", "develop" ]
schedule:
- cron: '33 23 * * 2'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: c-cpp
build-mode: manual
- language: python
build-mode: none
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# 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
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Dependencies
run: |
sudo apt-get update
sudo apt-get install libopenmpi-dev libhdf5-dev uuid-dev cmake

- name: Build PDC Dependencies
run: |
# libfabric
wget https://github.com/ofiwg/libfabric/archive/refs/tags/v1.12.1.tar.gz
tar xf v1.12.1.tar.gz
cd libfabric-1.12.1
./autogen.sh
./configure --disable-usnic --disable-mrail --disable-rstream --disable-perf --disable-efa --disable-psm2 --disable-psm --disable-verbs --disable-shm --disable-static --disable-silent-rules
make -j2 && sudo make install
cd ..

# Mercury
git clone --recursive https://github.com/mercury-hpc/mercury.git
cd mercury
git checkout v2.2.0
mkdir build && cd build
cmake ../ -DCMAKE_C_COMPILER=gcc -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=ON -DNA_USE_OFI=ON -DNA_USE_SM=OFF -DMERCURY_USE_CHECKSUMS=OFF -DCMAKE_POLICY_VERSION_MINIMUM=3.5
make -j2 && sudo make install

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
config-file: ./.github/codeql-config.yml
# 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.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
- name: Build PDC
shell: bash
run: |
mkdir build && cd build
cmake ../ -DBUILD_MPI_TESTING=ON -DBUILD_SHARED_LIBS=ON -DPDC_SERVER_CACHE=ON -DBUILD_TESTING=ON -DPDC_ENABLE_MPI=ON -DCMAKE_C_COMPILER=mpicc -DCMAKE_POLICY_VERSION_MINIMUM=3.5
make -j2 && sudo make install

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
8 changes: 4 additions & 4 deletions .github/workflows/dependencies-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ set -eu -o pipefail

export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=FALSE

brew install open-mpi automake
brew install open-mpi automake m4 libtool

# libfabric
wget https://github.com/ofiwg/libfabric/archive/refs/tags/v1.15.2.tar.gz
tar xf v1.15.2.tar.gz
cd libfabric-1.15.2
wget https://github.com/ofiwg/libfabric/archive/refs/tags/v1.20.0.tar.gz
tar xf v1.20.0.tar.gz
cd libfabric-1.20.0
./autogen.sh
./configure --disable-usnic --disable-mrail --disable-rstream --disable-perf --disable-efa --disable-psm2 --disable-psm --disable-verbs --disable-shm --disable-static --disable-silent-rules
make -j2 && sudo make install
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/gitlab-develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: GitLab

on:
push:
branches:
- develop

jobs:
sync-with-gitlab:
runs-on: ubuntu-latest
timeout-minutes: 2

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup git
run: |
git config --global user.name "PDC BOT"
git config --global user.email "[email protected]"

- name: Update branch
run: |
git fetch origin develop
git remote add gitlab https://${{ secrets.GITLAB_TOKEN_NAME }}:${{ secrets.GITLAB_TOKEN }}@${{ secrets.GITLAB_URL }}
git checkout develop
git push -f gitlab -u develop
28 changes: 28 additions & 0 deletions .github/workflows/gitlab-stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: GitLab

on:
push:
branches:
- stable

jobs:
sync-with-gitlab:
runs-on: ubuntu-latest
timeout-minutes: 2

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup git
run: |
git config --global user.name "PDC BOT"
git config --global user.email "[email protected]"

- name: Update branch
run: |
git fetch stable
git remote add gitlab https://${{ secrets.GITLAB_TOKEN_NAME }}:${{ secrets.GITLAB_TOKEN }}@${{ secrets.GITLAB_URL }}
git checkout stable
git push -f gitlab -u stable
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
PDC:
runs-on: macos-13
runs-on: macos-15
timeout-minutes: 60

steps:
Expand Down
Loading