Skip to content

Commit

Permalink
WIP: Rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
julienvincent committed Sep 4, 2024
1 parent c785b59 commit a3073d6
Show file tree
Hide file tree
Showing 99 changed files with 2,574 additions and 2,565 deletions.
2 changes: 2 additions & 0 deletions .cljfmt.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{:remove-multiple-non-indenting-spaces? true
:sort-ns-references? true}
92 changes: 92 additions & 0 deletions .github/workflows/release-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Release CLI

on:
push:
pull_request:
workflow_dispatch:

jobs:
build-cli:
strategy:
matrix:
include:
- arch: linux-amd64
runs-on: ubuntu-latest
- arch: linux-arm64
runs-on: arm-c8
- arch: macos-amd64
runs-on: macos-latest
- arch: macos-arm64
runs-on: macos-latest-xlarge

runs-on: ${{ matrix.runs-on }}
steps:
- name: Checkout git repo
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Fetch Tags
run: git fetch --tags origin

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: 'maven'
cache-dependency-path: '**/deps.edn'

- uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}

- uses: extractions/setup-just@v1
- uses: DeLaGuardo/[email protected]
with:
cli: latest

- name: Build
run: |
just build
just build-cli
- name: Pack binary
run: |
tar -czf kmono-${{ matrix.arch }}.tar.gz -C ./target/bin kmono
- uses: actions/upload-artifact@v3
with:
name: binaries
if-no-files-found: error
path: kmono-${{ matrix.arch }}.tar.gz

release-cli:
runs-on: ubuntu-latest
needs: [build-cli]
if: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
steps:
- uses: actions/checkout@v3

- name: Download Binary Artifacts
uses: actions/download-artifact@v2
with:
name: binaries
path: bin

- name: Calculate checksums
run: |
for file in bin/*; do
shasum -a 256 "$file" >> checksums.txt
done
mv checksums.txt bin/checksums.txt
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
bin/*
39 changes: 39 additions & 0 deletions .github/workflows/release-libs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build and Release Libs

on:
push:
pull_request:
workflow_dispatch:

jobs:
build-and-release-libs:
runs-on: ubuntu-latest
steps:
- name: Checkout git repo
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Fetch Tags
run: git fetch --tags origin

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: 'maven'
cache-dependency-path: '**/deps.edn'

- uses: extractions/setup-just@v1
- uses: DeLaGuardo/[email protected]
with:
cli: latest

- name: Build
if: ${{ github.ref_type != 'tag' }}
run: just build

- name: Build and Release
if: ${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
run: just build :release true
62 changes: 0 additions & 62 deletions .github/workflows/release.yml

This file was deleted.

121 changes: 0 additions & 121 deletions .github/workflows/release_binary.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test
on: [push]

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout git repo
uses: actions/checkout@v2

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
cache: 'maven'
cache-dependency-path: '**/deps.edn'

- uses: extractions/setup-just@v1
- uses: DeLaGuardo/[email protected]
with:
cli: latest

- name: Setup Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "Kmono CI"
- name: Test
run: |
just cli run --ordered false -M ':*/test'
41 changes: 11 additions & 30 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,32 +1,13 @@
# resources/ccloud.properties
.cache
/.clj-kondo
!/.clj-kondo/config.edn
.cpcache/
.kbuild/
.metabuild/
.nrepl-port
/telepresence.log
/classes/
target/
# /resources/zeus-service-account.json
/.log/
node_modules
config-override.edn
*.log.[0-9][0-9][0-9]
*.log
/resources/auth/
/.idea/
.tool-versions
*.iml
/.calva/
/.DS_Store/
/logs/
/data/
/deps.local.edn
/local
.idea
.vscode
.DS_Store

.cpcache
.lsp
.portal
.clj-kondo
.nrepl-port
.test-repos
deps.local.edn

!.github
bin
local
target
Loading

0 comments on commit a3073d6

Please sign in to comment.