-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 96b7fe5
Showing
27 changed files
with
5,582 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
debug/ | ||
target/ | ||
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
|
||
# MSVC Windows builds of rustc generate these, which store debugging information | ||
*.pdb | ||
|
||
|
||
# Added by cargo | ||
|
||
/target | ||
**/.env | ||
**/.DS_Store | ||
wasm/*.wasm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
JWT_SECRET=SECRET_TOKEN | ||
PORT=33000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Build Docker Image | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Copy .env file | ||
run: cp .env.example .env | ||
|
||
- name: Build and Push | ||
run: docker buildx bake --set "*.platform=linux/arm64/v8,linux/amd64" --push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v[0-9]+.*" | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
create_release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: marvinpinto/action-automatic-releases@latest | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
prerelease: false | ||
|
||
release_assets: | ||
needs: create_release | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- build: linux-x64 | ||
os: ubuntu-latest | ||
target: x86_64-unknown-linux-gnu | ||
artifact_name: "compilet-linux-amd64" | ||
- build: linux-arm64 | ||
os: ubuntu-latest | ||
target: aarch64-unknown-linux-gnu | ||
artifact_name: "compilet-linux-arm64" | ||
- build: macos-x64 | ||
os: macos-latest | ||
target: x86_64-apple-darwin | ||
artifact_name: "compilet-darwin-amd64" | ||
- build: macos-arm64 | ||
os: macos-latest | ||
target: aarch64-apple-darwin | ||
artifact_name: "compilet-darwin-arm64" | ||
- build: windows-x64 | ||
os: windows-latest | ||
target: x86_64-pc-windows-msvc | ||
artifact_name: "compilet-windows-amd64" | ||
- build: linux-musl-x64 | ||
os: ubuntu-latest | ||
target: x86_64-unknown-linux-musl | ||
artifact_name: "compilet-linux-musl-amd64" | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
target: ${{ matrix.target }} | ||
|
||
- name: Install musl-tools | ||
run: sudo apt update && sudo apt install -y musl-tools | ||
if: matrix.build == 'linux-musl-x64' | ||
|
||
- name: Install gcc-aarch64-linux-gnu | ||
run: sudo apt update && sudo apt install -y gcc-aarch64-linux-gnu | ||
if: matrix.build == 'linux-arm64' | ||
|
||
- name: Build | ||
run: cargo build --release --target ${{ matrix.target }} | ||
|
||
- name: Upload to Release | ||
uses: svenstaro/upload-release-action@v2 | ||
if: matrix.os != 'windows-latest' | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: target/${{ matrix.target }}/release/compilet | ||
asset_name: ${{ matrix.artifact_name }} | ||
tag: ${{ github.ref }} | ||
|
||
- name: Upload to Release (Windows) | ||
uses: svenstaro/upload-release-action@v2 | ||
if: matrix.os == 'windows-latest' | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: target/${{ matrix.target }}/release/compilet.exe | ||
asset_name: ${{ matrix.artifact_name }}.exe | ||
tag: ${{ github.ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
|
||
- name: Check Formatting | ||
run: cargo fmt --all --check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
debug/ | ||
target/ | ||
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
|
||
# MSVC Windows builds of rustc generate these, which store debugging information | ||
*.pdb | ||
|
||
|
||
# Added by cargo | ||
|
||
/target | ||
**/.env | ||
**/.DS_Store | ||
wasm/*.wasm |
Oops, something went wrong.