Skip to content

Commit

Permalink
refactor: migrate to Rust (#120)
Browse files Browse the repository at this point in the history
* feat: work

* refactor: move agones crds to a dedicated package

* feat(sdk): generate sdk using buf

* feat(operator): add Dockerfile

* chore: remove last parts with Go

* ci: cache Rust dependencies

* refactor: remove old java sdk

* feat: generate agones sdk with buf

* chore: add semantic-release

* chore: added commitlint

* chore: fix versions

* ci: install buf
  • Loading branch information
jeremylvln authored Oct 10, 2023
1 parent 977c085 commit f4646c5
Show file tree
Hide file tree
Showing 233 changed files with 39,914 additions and 26,090 deletions.
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build]
target-dir = "dist/rust"
12 changes: 8 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
# Ignore build and test binaries.
bin/
testbin/
.git/
.gradle/
build/
dist/
node_modules/
docs/.docusaurus/
docs/build/
docs/node_modules/
1 change: 0 additions & 1 deletion .envrc

This file was deleted.

1 change: 0 additions & 1 deletion .envrc.example

This file was deleted.

1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ body:
multiple: true
options:
- Operator
- Addon - Matchmaking
- Proxy API
- Proxy Agent (BungeeCord)
- Proxy Agent (Velocity)
Expand Down
20 changes: 0 additions & 20 deletions .github/release.yml

This file was deleted.

14 changes: 9 additions & 5 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
{
"extends": ["config:base", ":semanticCommits"],
"automerge": false,
"extends": [
"config:recommended",
":pinAllExceptPeerDependencies",
":automergeMinor"
],
"dependencyDashboard": false,
"enabledManagers": ["github-actions", "gomod", "gradle"],
"enabledManagers": ["github-actions", "npm", "cargo", "gradle"],
"labels": ["type:dependencies :wrench:"],
"prCreation": "not-pending",
"reviewersFromCodeOwners": false,
"stabilityDays": 3,
"minimumReleaseAge": "14 days",
"semanticCommits": "enabled",
"updateNotScheduled": false,
"vulnerabilityAlerts": {
"labels": ["type:dependencies :wrench:", "priority:critical :fire:"]
"addLabels": ["priority:critical :fire:"]
}
}
68 changes: 40 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: pull_request

env:
TARGET_NODE_VERSION: '18'
TARGET_GOLANG_VERSION: '1.19'
TARGET_RUST_VERSION: 'stable'
TARGET_JAVA_VERSION: '17'

concurrency:
Expand All @@ -27,11 +27,10 @@ jobs:
node-version: ${{ env.TARGET_NODE_VERSION }}
cache: npm

- name: Use Golang ${{ env.TARGET_GOLANG_VERSION }}
uses: actions/setup-go@v3
- name: Use Rust ${{ env.TARGET_RUST_VERSION }}
uses: actions-rs/toolchain@v1
with:
go-version: ${{ env.TARGET_GOLANG_VERSION }}
cache: true
toolchain: ${{ env.TARGET_RUST_VERSION }}

- name: Use Java ${{ env.TARGET_JAVA_VERSION }}
uses: actions/setup-java@v3
Expand All @@ -40,15 +39,20 @@ jobs:
java-version: ${{ env.TARGET_JAVA_VERSION }}
cache: 'gradle'

- name: Cache Kubernetes tools
uses: actions/cache@v3
with:
path: scripts/.tools
key: ${{ runner.os }}-k8stools-${{ hashFiles('scripts/download_tools.sh') }}
- name: Install Buf
uses: bufbuild/buf-setup-action@v1

- name: Install Node.js dependencies
run: npm ci

- name: Restore Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: . -> dist/rust

- name: Install Rust dependencies
run: cargo check

- name: Run build
uses: mansagroup/nrwl-nx-action@v3
with:
Expand All @@ -71,11 +75,10 @@ jobs:
node-version: ${{ env.TARGET_NODE_VERSION }}
cache: npm

- name: Use Golang ${{ env.TARGET_GOLANG_VERSION }}
uses: actions/setup-go@v3
- name: Use Rust ${{ env.TARGET_RUST_VERSION }}
uses: actions-rs/toolchain@v1
with:
go-version: ${{ env.TARGET_GOLANG_VERSION }}
cache: true
toolchain: ${{ env.TARGET_RUST_VERSION }}

- name: Use Java ${{ env.TARGET_JAVA_VERSION }}
uses: actions/setup-java@v3
Expand All @@ -84,15 +87,20 @@ jobs:
java-version: ${{ env.TARGET_JAVA_VERSION }}
cache: 'gradle'

- name: Cache Kubernetes tools
uses: actions/cache@v3
with:
path: scripts/.tools
key: ${{ runner.os }}-k8stools-${{ hashFiles('scripts/download_tools.sh') }}
- name: Install Buf
uses: bufbuild/buf-setup-action@v1

- name: Install Node.js dependencies
run: npm ci

- name: Restore Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: . -> dist/rust

- name: Install Rust dependencies
run: cargo check

- name: Run tests
uses: mansagroup/nrwl-nx-action@v3
with:
Expand All @@ -115,11 +123,10 @@ jobs:
node-version: ${{ env.TARGET_NODE_VERSION }}
cache: npm

- name: Use Golang ${{ env.TARGET_GOLANG_VERSION }}
uses: actions/setup-go@v3
- name: Use Rust ${{ env.TARGET_RUST_VERSION }}
uses: actions-rs/toolchain@v1
with:
go-version: ${{ env.TARGET_GOLANG_VERSION }}
cache: true
toolchain: ${{ env.TARGET_RUST_VERSION }}

- name: Use Java ${{ env.TARGET_JAVA_VERSION }}
uses: actions/setup-java@v3
Expand All @@ -128,15 +135,20 @@ jobs:
java-version: ${{ env.TARGET_JAVA_VERSION }}
cache: 'gradle'

- name: Cache Kubernetes tools
uses: actions/cache@v3
with:
path: scripts/.tools
key: ${{ runner.os }}-k8stools-${{ hashFiles('scripts/download_tools.sh') }}
- name: Install Buf
uses: bufbuild/buf-setup-action@v1

- name: Install Node.js dependencies
run: npm ci

- name: Restore Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: . -> dist/rust

- name: Install Rust dependencies
run: cargo check

- name: Run lint
uses: mansagroup/nrwl-nx-action@v3
with:
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: docs

on:
push:
branches:
- main

env:
TARGET_NODE_VERSION: '18'

concurrency:
group: docs

jobs:
publish:
runs-on: ubuntu-latest

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Use Node.js ${{ env.TARGET_NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.TARGET_NODE_VERSION }}
cache: npm

- name: Install Buf
uses: bufbuild/buf-setup-action@v1

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Install Node.js dependencies
run: npm ci

- name: Build Docusaurus
uses: mansagroup/nrwl-nx-action@v3
with:
targets: build
projects: docs

- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: docs/build

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
Loading

0 comments on commit f4646c5

Please sign in to comment.