Skip to content

Commit

Permalink
chore: merge develop into the main (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal authored Dec 25, 2024
2 parents 2d353a4 + bd31e47 commit 5201c27
Show file tree
Hide file tree
Showing 432 changed files with 82,125 additions and 3 deletions.
28 changes: 28 additions & 0 deletions .github/.assets/aggkit-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@agglayer/aggkit
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG] "
labels: bug
assignees: ''

---

# Bug Report

## Description

A clear and concise description of what the bug is.

## To Reproduce

Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

## Expected behavior

A clear and concise description of what you expected to happen.

## Screenshots

If applicable, add screenshots to help explain your problem.

## Environment (please complete the following information):

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

## Additional context

Add any other context about the problem here.
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FEATURE] "
labels: enhancement
assignees: ''

---

# Feature Request

## Is your feature request related to a problem? Please describe

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

## Describe the solution you'd like

A clear and concise description of what you want to happen.

## Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

## Additional context

Add any other context or screenshots about the feature request here.
5 changes: 5 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Description

Please include a summary of the change and which issue is fixed. Also, include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)
Binary file added .github/assets/cdk-logo-name.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions .github/assets/cdk-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
89 changes: 89 additions & 0 deletions .github/workflows/arm_deb_packager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: arm_deb_packager


on:
push:
branches:
- 'main'
paths:
- '**'
tags:
- 'v*.*.*'
- 'v*.*.*-*'

jobs:
build:
permissions:
id-token: write
contents: write
runs-on:
labels: arm-runner-2204
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@master
with:
go-version: 1.22.x
# Variables
- name: Adding TAG to ENV
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV
- name: adding version
run: |
NUMERIC_VERSION=$( echo ${{ env.GIT_TAG }} | sed 's/[^0-9.]//g' )
echo "VERSION=$NUMERIC_VERSION" >> $GITHUB_ENV
- name: go mod download
run: go mod download

- name: Build the binary
run: make build

- name: Build the rust binary
run: |
BUILD_SCRIPT_DISABLED=1
cargo build --release --bin aggkit-cli
- name: making directory structure
run: mkdir -p packaging/deb/aggkit/usr/bin/
- name: copying necessary binary for arm64
run: cp -rp target/aggkit packaging/deb/aggkit/usr/bin/aggkit
- name: copying rust binary for arm64
run: cp -rp target/release/aggkit-cli packaging/deb/aggkit-cli/usr/bin/aggkit-cli

# Control file creation
- name: Create control file
run: |
echo "Package: aggkit" >> packaging/deb/aggkit/DEBIAN/control
echo "Version: ${{ env.VERSION }}" >> packaging/deb/aggkit/DEBIAN/control
echo "Section: base" >> packaging/deb/aggkit/DEBIAN/control
echo "Priority: optional" >> packaging/deb/aggkit/DEBIAN/control
echo "Architecture: arm64" >> packaging/deb/aggkit/DEBIAN/control
echo "Maintainer: [email protected]" >> packaging/deb/aggkit/DEBIAN/control
echo "Description: aggkit binary package" >> packaging/deb/aggkit/DEBIAN/control
- name: Creating package for binary for aggkit ${{ env.ARCH }}
run: cp -rp packaging/deb/aggkit packaging/deb/aggkit-${{ env.GIT_TAG }}-${{ env.ARCH }}
env:
ARCH: arm64

- name: Running package build
run: dpkg-deb --build --root-owner-group packaging/deb/aggkit-${{ env.GIT_TAG }}-${{ env.ARCH }}
env:
ARCH: arm64

- name: create checksum for the arm64 package
run: cd packaging/deb/ && sha256sum aggkit-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > aggkit-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum
env:
ARCH: arm64

- name: Release aggkit Packages
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.GIT_TAG }}
prerelease: true
files: |
packaging/deb/aggkit**.deb
packaging/deb/aggkit**.deb.checksum
103 changes: 103 additions & 0 deletions .github/workflows/arm_rpm_packager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: arm_rpm_packager

on:
push:
branches:
- 'main'
paths:
- '**'
tags:
- 'v*.*.*'
- 'v*.*.*-*'

jobs:
build:
permissions:
id-token: write
contents: write
runs-on:
labels: arm-runner-2204
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@master
with:
go-version: 1.22.x
- name: Adding TAG to ENV
run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV

- name: Adding a TAG.1 to the env
run: echo "GIT_TAG1=`echo $(git describe --tags --abbrev=0)`" | sed 's/-/./g' >> $GITHUB_ENV

- name: Download deps for project
run: go mod download

- name: Building aggkit for amd64
run: make build

- name: Building the aggkit for arm64
run: |
BUILD_SCRIPT_DISABLED=1
cargo build --release --bin aggkit-cli
- name: Installing some dependencies
run: sudo apt-get update && sudo apt-get install -y rpm

- name: Setup rpm package for binary
run: |
mkdir -p packaging/rpm/SPECS
mkdir -p packaging/rpm/BUILD
mkdir -p packaging/rpm/RPMS
mkdir -p packaging/rpm/SRPMS
touch packaging/rpm/aggkit.spec
echo "Name: aggkit" >> packaging/rpm/SPECS/aggkit.spec
echo "Version: ${{ env.GIT_TAG1 }}" >> packaging/rpm/SPECS/aggkit.spec
echo "Release: 1%{?dist}" >> packaging/rpm/SPECS/aggkit.spec
echo "License: GPL/AGPL" >> packaging/rpm/SPECS/aggkit.spec
echo "BuildArch: aarch64" >> packaging/rpm/SPECS/aggkit.spec
echo "Summary: aggkit rpm package" >> packaging/rpm/SPECS/aggkit.spec
echo "%description" >> packaging/rpm/SPECS/aggkit.spec
echo "aggkit rpm package" >> packaging/rpm/SPECS/aggkit.spec
echo "%pre" >> packaging/rpm/SPECS/aggkit.spec
echo "getent group aggkit >/dev/null || groupadd -r aggkit" >> packaging/rpm/SPECS/aggkit.spec
echo "getent passwd aggkit >/dev/null || useradd -s /bin/false -d /opt/aggkit -r aggkit -g aggkit" >> packaging/rpm/SPECS/aggkit.spec
echo "%install" >> packaging/rpm/SPECS/aggkit.spec
echo "mkdir -p %{buildroot}/usr/bin" >> packaging/rpm/SPECS/aggkit.spec
echo "cp /home/runner/work/aggkit/aggkit/target/aggkit %{buildroot}/usr/bin/aggkit" >> packaging/rpm/SPECS/aggkit.spec
echo "cp /home/runner/work/aggkit/aggkit/target/release/aggkit %{buildroot}/usr/bin/aggkit" >> packaging/rpm/SPECS/aggkit.spec
echo "%files" >> packaging/rpm/SPECS/aggkit.spec
echo "/usr/bin/aggkit" >> packaging/rpm/SPECS/aggkit.spec
echo "/usr/bin/aggkit" >> packaging/rpm/SPECS/aggkit.spec
- name: Construct rpm package
run: |
rpmbuild --define "_topdir /home/runner/work/aggkit/aggkit/packaging/rpm_build" \
--define "_builddir %{_topdir}/BUILD" \
--define "_rpmdir %{_topdir}/RPMS" \
--define "_srcrpmdir %{_topdir}/SRPMS" \
--define "__spec_install_post /bin/true" \
-bb packaging/rpm/SPECS/aggkit.spec
- name: Rename file for post rpm build and for checksum
run: mv /home/runner/work/aggkit/aggkit/packaging/rpm_build/RPMS/aarch64/aggkit-${{ env.GIT_TAG1 }}-1.aarch64.rpm /home/runner/work/aggkit/aggkit/packaging/rpm_build/RPMS/aarch64/aggkit-${{ env.GIT_TAG1 }}.aarch64.rpm

- name: Checksum for the rpm package
run: sha256sum /home/runner/work/aggkit/aggkit/packaging/rpm_build/RPMS/aarch64/aggkit-${{ env.GIT_TAG1 }}.aarch64.rpm > /home/runner/work/aggkit/aggkit/packaging/rpm_build/RPMS/aarch64/aggkit-${{ env.GIT_TAG1 }}.aarch64.rpm.checksum

- name: Release aggkit Packages
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.GIT_TAG }}
prerelease: true
files: |
packaging/rpm_build/RPMS/aarch64/aggkit-**.rpm
packaging/rpm_build/RPMS/aarch64/aggkit-**.rpm.checksum
44 changes: 44 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "CodeQL"

on:
push:
branches:
- develop
- main
pull_request:

jobs:
analyze:
name: Analyze
runs-on: ${{ matrix.language == 'swift' && 'macos-latest' || 'ubuntu-latest' }}
timeout-minutes: ${{ matrix.language == 'swift' && 120 || 360 }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language:
- go

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"
22 changes: 22 additions & 0 deletions .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Checking PR semantic

on:
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: read
pull-requests: read
statuses: write

jobs:
title:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
ignoreLabels: |
release
Loading

0 comments on commit 5201c27

Please sign in to comment.