Skip to content

Commit

Permalink
chore: initial commit
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Tomasi <dominik.tomasi@gmail.com>
  • Loading branch information
dtomasi committed Apr 29, 2024
0 parents commit 921f314
Show file tree
Hide file tree
Showing 126 changed files with 6,648 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf

# These are Windows script files and should use crlf
*.bat text eol=crlf
27 changes: 27 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on:
workflow_dispatch:
workflow_call:

jobs:
docs:
name: Genrate PKL Docs
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Init Hermit
uses: cashapp/activate-hermit@v1
with:
cache: true
- name: Generate Docs
run: |
java --version
find ./docs -maxdepth 1 ! -name packages -not -path './docs' -exec rm -rf {} +
./gradlew pkldoc --stacktrace
- uses: EndBug/add-and-commit@v9
if: success()
with:
add: docs/*
message: 'chore(generate): update package docs'
push: true
38 changes: 38 additions & 0 deletions .github/workflows/pkl-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
on:
workflow_call:
pull_request:
paths:
- packages/**

jobs:
list-packages:
runs-on: ubuntu-latest
outputs:
dirs: ${{ steps.dirs.outputs.dirs }}
steps:
- uses: actions/checkout@v4
- id: dirs
# language=shell script
run: |
echo "dirs=$(ls -d packages/*/ | sed 's:/*$::' | jq --raw-input --slurp --compact-output 'split("\n")[:-1]')" >> ${GITHUB_OUTPUT}
cat ${GITHUB_OUTPUT}
matrix:
runs-on: ubuntu-latest
needs: [list-packages]
defaults:
run:
working-directory: .
strategy:
matrix:
dir: ${{ fromJson(needs.list-packages.outputs.dirs) }}
steps:
- uses: actions/checkout@v4
- name: Init Hermit
uses: cashapp/activate-hermit@v1
with:
cache: true
# language=shell script
- name: ${{ matrix.dir }}-test
run : |
pkl test -w ${{ matrix.dir }}
17 changes: 17 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: pre-commit

on:
pull_request:
push:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Init Hermit
uses: cashapp/activate-hermit@v1
with:
cache: true
- uses: pre-commit/action@v3.0.1
92 changes: 92 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
on:
workflow_dispatch:
inputs:
skipPublishCheck:
description: Skips the publish check for gradle build jobs
type: boolean
default: false
push:
paths:
- packages/**
branches:
- main
jobs:

build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Init Hermit
uses: cashapp/activate-hermit@v1
with:
cache: true
# language=shell script
- run: |
java --version
CI_SKIP_PUBLISH_CHECK=${{ inputs.skipPublishCheck }} ./gradlew build
- run: |
ls -R build/releases
- uses: actions/upload-artifact@v4
with:
path: build/releases/*
overwrite: true
retention-days: 1
- uses: EndBug/add-and-commit@v9
with:
add: docs/*
message: 'chore(generate): add generated metadata files'
push: true

list-releases:
runs-on: ubuntu-latest
needs: [ build]
outputs:
dirs: ${{ steps.dirs.outputs.dirs }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- id: dirs
# language=shell script
run: |
echo "dirs=$(ls -d artifact/* | jq --raw-input --slurp --compact-output 'split("\n")[:-1]')" >> ${GITHUB_OUTPUT}
cat ${GITHUB_OUTPUT}
release:
name: Release Matrix
runs-on: ubuntu-latest
permissions:
contents: write
needs: [ list-releases ]
defaults:
run:
working-directory: .
strategy:
matrix:
dir: ${{ fromJson(needs.list-releases.outputs.dirs) }}
steps:
- uses: actions/checkout@v4
- name: Init Hermit
uses: cashapp/activate-hermit@v1
with:
cache: true
- uses: actions/download-artifact@v4
- name: Prepare release variables
id: prepare-release-variables
# language=shell script
run: |
echo "PACKAGE_FQN=$(basename ${{ matrix.dir }})" >> $GITHUB_OUTPUT
cat ${GITHUB_OUTPUT}
- uses: ncipollo/release-action@v1
with:
name: ${{ steps.prepare-release-variables.outputs.PACKAGE_FQN }}
tag: ${{ steps.prepare-release-variables.outputs.PACKAGE_FQN }}
allowUpdates: true
artifacts: "${{ matrix.dir }}/*"
removeArtifacts: true
replacesArtifacts: true

docs:
uses: ./.github/workflows/docs.yml
needs: [release]
195 changes: 195 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
### VisualStudioCode template
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Linux template
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### Gradle template
.gradle
**/build/
!src/**/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Avoid ignore Gradle wrappper properties
!gradle-wrapper.properties

# Cache of project
.gradletasknamecache

# Eclipse Gradle plugin generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath

### Windows template
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

### macOS template
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk


# Ignore Gradle build output directory
build

### Hermit

.hermit/python/cache

### Project
.tmp
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
exclude: (docs|bin|\.deps.json)
- id: end-of-file-fixer
exclude: (docs|bin|\.deps.json)
- id: check-yaml
- id: check-json
- id: check-added-large-files
Loading

0 comments on commit 921f314

Please sign in to comment.