Skip to content

Commit cde26c3

Browse files
authored
Merge branch 'ak/fixpointv2' into ak/fixpointv2-cdg
2 parents 64232b4 + ec7a7a0 commit cde26c3

File tree

27 files changed

+397
-441
lines changed

27 files changed

+397
-441
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ jobs:
4444
export VERSION=$(echo "${GITHUB_REF}" | cut -d "/" -f3)
4545
if [[ $VERSION != v* ]]
4646
then
47-
export VERSION=""
48-
echo "Building version-less (main or feature branch)"
47+
export VERSION="${VERSION}-SNAPSHOT"
48+
echo "Building as ${VERSION}"
4949
else
5050
# make version more Java-friendly by dropping the 'v'
5151
export VERSION=${VERSION:1:${#VERSION}}
@@ -139,8 +139,15 @@ jobs:
139139
if: github.ref == 'refs/heads/main'
140140
uses: JamesIves/github-pages-deploy-action@v4
141141
with:
142-
folder: build/dokkaCustomMultiModuleOutput/main
142+
folder: build/dokkaCustomMultiModuleOutput/main-SNAPSHOT
143143
target-folder: dokka/main
144+
- name: Publish to GitHub Packages
145+
if: github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'publish-to-github-packages')
146+
run: |
147+
./gradlew --parallel -Pversion=$VERSION publishAllPublicationsToGitHubPackagesRepository
148+
env:
149+
VERSION: ${{ env.version }}
150+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
144151
- name: Create Release
145152
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'beta') && !contains(github.ref, 'alpha')
146153
id: create_release

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Code Property Graph
22
[![Actions Status](https://github.com/Fraunhofer-AISEC/cpg/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/Fraunhofer-AISEC/cpg/actions)
3-
[![codecov](https://codecov.io/gh/Fraunhofer-AISEC/cpg/graph/badge.svg?token=XBXZZOQIID)](https://codecov.io/gh/Fraunhofer-AISEC/cpg) [![](https://jitpack.io/v/Fraunhofer-AISEC/cpg.svg)](https://jitpack.io/#Fraunhofer-AISEC/cpg)
3+
[![codecov](https://codecov.io/gh/Fraunhofer-AISEC/cpg/graph/badge.svg?token=XBXZZOQIID)](https://codecov.io/gh/Fraunhofer-AISEC/cpg)
44

55
A simple library to extract a *code property graph* out of source code. It has support for multiple passes that can extend the analysis after the graph is constructed. It currently supports C/C++ (C17), Java (Java 13) and has experimental support for Golang, Python and TypeScript. Furthermore, it has support for the [LLVM IR](http://llvm.org/docs/LangRef.html) and thus, theoretically support for all languages that compile using LLVM.
66

@@ -76,7 +76,9 @@ Beware, that the `cpg` module includes all optional features and might potential
7676

7777
#### Development Builds
7878

79-
A published artifact of every commit can be requested through [JitPack](https://jitpack.io/#Fraunhofer-AISEC/cpg). This is especially useful, if your external project makes use of a specific feature that is not yet merged in yet or not published as a version yet. Please follow the instructions on the JitPack page. Please be aware, that similar to release builds, the CDT repository needs to be added as well (see above).
79+
For all builds on the `main` branch, an artefact is published in the [GitHub Packages](https://github.com/orgs/Fraunhofer-AISEC/packages?repo_name=cpg) under the version `main-SNAPSHOT`. Additionally, selected PRs that have the `publish-to-github-packages` label will also be published there. This is useful if an important feature is not yet in main, but you want to test it. The version refers to the PR number, e.g. `1954-SNAPSHOT`.
80+
81+
To use the GitHub Gradle Registry, please refer to https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-gradle-registry#using-a-published-package
8082

8183
### On Command Line
8284

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ fun generateDokkaWithVersionTag(dokkaMultiModuleTask: org.jetbrains.dokka.gradle
8181
*/
8282
nexusPublishing {
8383
repositories {
84-
sonatype() {
84+
sonatype {
8585
val mavenCentralUsername: String? by project
8686
val mavenCentralPassword: String? by project
8787

buildSrc/src/main/kotlin/cpg.common-conventions.gradle.kts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,17 @@ publishing {
8282
}
8383
}
8484
}
85+
86+
repositories {
87+
maven {
88+
name = "GitHubPackages"
89+
url = uri("https://maven.pkg.github.com/Fraunhofer-AISEC/cpg")
90+
credentials {
91+
username = System.getenv("GITHUB_ACTOR")
92+
password = System.getenv("GITHUB_TOKEN")
93+
}
94+
}
95+
}
8596
}
8697

8798
signing {
@@ -121,7 +132,7 @@ testing {
121132
targets {
122133
all {
123134
testTask.configure {
124-
maxHeapSize = "4048m"
135+
maxHeapSize = "8096m"
125136
}
126137
}
127138
}

codyze-compliance/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ publishing {
3131
publications {
3232
named<MavenPublication>("codyze-compliance") {
3333
pom {
34-
artifactId = "codyze"
34+
artifactId = "codyze-compliance"
3535
name.set("Codyze - Compliance Module")
3636
description.set("The compliance module of Codyze")
3737
}

0 commit comments

Comments
 (0)