Skip to content

Commit

Permalink
Merge branch 'main' into codegen-2
Browse files Browse the repository at this point in the history
  • Loading branch information
liulx20 authored Aug 20, 2024
2 parents a0c622c + b04f585 commit d5ecd2b
Show file tree
Hide file tree
Showing 154 changed files with 2,383 additions and 3,965 deletions.
1 change: 0 additions & 1 deletion .github/free-disk-space.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,4 @@ rm -rf /usr/share/dotnet/
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
df -h
259 changes: 49 additions & 210 deletions .github/workflows/build-graphscope-dev-images.yml

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions .github/workflows/build-graphscope-dev-wheel-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build GraphScope Wheel Images

# build `graphscope/graphscope-dev:wheel-{v6d_version}` image based on manylinux,
# including all dependencies for building graphscope wheel package.
on:
workflow_dispatch:
inputs:
v6d_version:
description: 'Version for Vineyard (v6d)'
required: true
default: 'main'
pull_request:
branches:
- main
paths:
- 'python/graphscope/gsctl/scripts/**'
- '.github/workflows/build-graphscope-dev-wheel-images.yml'

concurrency:
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true

env:
REGISTRY: registry.cn-hongkong.aliyuncs.com

jobs:
build-wheel-image-amd64:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Build Image
run: |
# build wheel image with specified v6d's version
cd ${GITHUB_WORKSPACE}/k8s
VINEYARD_VERSION=${{ github.event.inputs.v6d_version }}
if [[ -n ${VINEYARD_VERSION} ]]; then
# graphscope/graphscope-dev:wheel-<v6d_version>-amd64
make dev-wheel VINEYARD_VERSION=${VINEYARD_VERSION}
else
# pull_request: use default vineyard_version
make dev-wheel
fi
- name: Release Image
if: ${{ github.event_name == 'workflow_dispatch' }}
env:
docker_password: ${{ secrets.DOCKER_PASSWORD }}
docker_username: ${{ secrets.DOCKER_USER }}
run: |
echo "${docker_password}" | sudo docker login --username="${docker_username}" ${{ env.REGISTRY }} --password-stdin
VINEYARD_VERSION=${{ github.event.inputs.v6d_version }}
sudo docker tag graphscope/graphscope-dev:wheel-${VINEYARD_VERSION}-amd64 ${{ env.REGISTRY }}/graphscope/graphscope-dev:wheel-${VINEYARD_VERSION}-amd64
sudo docker push ${{ env.REGISTRY }}/graphscope/graphscope-dev:wheel-${VINEYARD_VERSION}-amd64
106 changes: 0 additions & 106 deletions .github/workflows/build-graphscope-manylinux-ext-images.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/build-graphscope-manylinux-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build GraphScope Manylinux Images

# build `graphscope/manylinux2014` image based on centos7, including all necessary
# dependencies except vineyard
on:
workflow_dispatch:
pull_request:
branches:
- main
paths:
- 'python/graphscope/gsctl/scripts/**'
- '.github/workflows/build-graphscope-manylinux-images.yml'


concurrency:
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true

env:
REGISTRY: registry.cn-hongkong.aliyuncs.com

jobs:
build-manylinux-image-amd64:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Build Image
run: |
cd ${GITHUB_WORKSPACE}/k8s
# output: graphscope/manylinux:amd64
make manylinux2014
- name: Release Image
if: ${{ github.event_name == 'workflow_dispatch' }}
env:
docker_password: ${{ secrets.DOCKER_PASSWORD }}
docker_username: ${{ secrets.DOCKER_USER }}
run: |
echo "${docker_password}" | sudo docker login --username="${docker_username}" ${{ env.REGISTRY }} --password-stdin
# manylinux2014 image
sudo docker tag graphscope/manylinux2014:amd64 ${{ env.REGISTRY }}/graphscope/manylinux2014:amd64
sudo docker push ${{ env.REGISTRY }}/graphscope/manylinux2014:amd64
121 changes: 121 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# 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: [ "main" ]
paths:
- 'analytical_engine/**'
- 'interactive_engine/**'
- 'learning_engine/**'
- 'coordinator/**'
- 'flex/**'
- 'python/**'
# Commented out to save time; reopen after install-deps refactored.
# pull_request:
# branches: [ "main" ]
schedule:
- cron: '38 20 * * 5'

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' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
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: c-cpp
build-mode: manual
- language: java-kotlin
build-mode: none # This mode only analyzes Java. Set this to 'autobuild' or 'manual' to analyze Kotlin too.
- language: javascript-typescript
build-mode: none
- language: python
build-mode: none
# CodeQL supports the following values keywords for 'language': '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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# 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.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
name: Cpp Manual Build and Analysis
shell: bash
run: |
echo 'Install dependencies'
pip install gsctl
gsctl install-deps dev
source ~/.graphscope_env
echo 'Making GRAPE'
cd analytical_engine
mkdir build
cd build
cmake -DBUILD_TESTS=OFF \
-DENABLE_JAVA_SDK=OFF ..
make
echo 'Clean extra artifacts to free device space.'
du -hcd1 ~ /opt/graphscope || true
rm -rf /opt/vineyard/bin/run_* || true
rm -rf ~/.local || true
rm -rf ~/.rustup || true
# PWD: /analytical_engine/build
bash ../../.github/free-disk-space.sh || true
du -hcd1 ~ /opt/graphscope || true
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
Loading

0 comments on commit d5ecd2b

Please sign in to comment.