Skip to content
Open

SW5 #98

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions .github/workflows/build.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/build_artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build Artifacts

on:
workflow_dispatch:
push:

jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
name: Build ${{ matrix.os }}
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: cargo build --release
uses: clechasseur/rs-cargo@v1
with:
command: build
args: --release
- uses: actions/upload-artifact@v3
with:
name: ecdar_api-${{ matrix.os }}
path: ${{ runner.os == 'Windows' && 'target/release/ecdar_api.exe' || 'target/release/ecdar_api' }}
if-no-files-found: error
retention-days: 7
25 changes: 3 additions & 22 deletions .github/workflows/check_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@ on:

jobs:
fmt:
name: cargo fmt
name: cargo fmt & Clippy lint and check
runs-on: ubuntu-latest
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: sudo apt-get install llvm protobuf-compiler
- uses: actions/checkout@v3
with:
submodules: 'true'
Expand All @@ -27,23 +24,7 @@ jobs:
with:
command: fmt
args: --all -- --check

clippy:
name: Clippy lint and check
runs-on: ubuntu-latest
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v2
- uses: actions/checkout@v3
with:
submodules: 'true'
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: clippy --all-targets --all-features
uses: clechasseur/rs-clippy-check@v3
with:
args: --all-targets --all-features
args: --all-targets --all-features -- -D warnings
5 changes: 3 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "Ecdar-ProtoBuf"]
path = Ecdar-ProtoBuf
url = https://github.com/ECDAR-AAU-SW-P5/Ecdar-ProtoBuf.git
path = Ecdar-ProtoBuf
url = https://github.com/Ecdar/Ecdar-ProtoBuf
branch = SW5 # main
18 changes: 12 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "api_server"
name = "ecdar_api"
version = "0.0.1"
build = "src/build.rs"
edition = "2021"
Expand All @@ -18,33 +18,39 @@ authors = [
'William Woldum'
]

[lib]
name = "ecdar_api"
proc-macro = true

[[bin]]
name = "server"
path = "src/main.rs"

[dependencies]
migration = { path = "migration" }
tokio = { version = "1.33.0", features = ["full"] }
dotenv = "0.15.0"
sea-orm = { version = "^0.12.0", features = ["sqlx-postgres", "runtime-async-std-native-tls", "macros", "tests-cfg", "sqlx-sqlite"] }
async-trait = { version = "0.1.73", features = [] }
futures = "0.3.28"
tonic = "0.10.2"
tonic = "0.11.0"
prost = "0.12.1"
log = "0.4.20"
jsonwebtoken = "9.1.0"
serde = "1.0.189"
chrono = "0.4.31"
uuid = { version = "1.5.0", features = ["v4"] }
regex = "1.10.2"
mockall = "0.11.4"
mockall = "0.12.1"
bcrypt = "0.15.0"
serde_json = "1.0.108"
ecdar_api_macros = { version = "0.1.0", path = "ecdar_api_macros" }
syn = { version = "2.0", features = ["full"] }
quote = "1.0"
convert_case = "0.6.0"
migration = { path = "migration" }
thiserror = "1.0.50"

[build-dependencies]
tonic-build = "0.10.2"
tonic-build = "0.11.0"

[lints.clippy]
complexity = "deny"
Expand Down
2 changes: 1 addition & 1 deletion Ecdar-ProtoBuf
14 changes: 0 additions & 14 deletions ecdar_api_macros/Cargo.toml

This file was deleted.

Loading