-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Loading branch information
There are no files selected for viewing
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_app-${{ matrix.os }} | ||
path: ${{ runner.os == 'Windows' && 'target/release/ecdar_app.exe' || 'target/release/ecdar_app' }} | ||
if-no-files-found: error | ||
retention-days: 7 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Check formatting | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
|
||
jobs: | ||
fmt: | ||
name: cargo fmt & Clippy lint and check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: sudo apt-get install llvm protobuf-compiler | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: 'true' | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: rustfmt | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-on-failure: true | ||
- name: cargo fmt --all | ||
uses: clechasseur/rs-cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
- name: clippy --all-targets --all-features | ||
uses: clechasseur/rs-clippy-check@v3 | ||
with: | ||
args: --all-targets --all-features -- -D warnings |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
# Label of the container job | ||
container-job: | ||
# Containers must run in Linux based operating systems | ||
runs-on: ubuntu-latest | ||
# Docker Hub image that `container-job` executes in | ||
container: rust | ||
|
||
# Service containers to run with `container-job` | ||
services: | ||
# Label used to access the service container | ||
postgres: | ||
# Docker Hub image | ||
image: postgres | ||
ports: | ||
- 5432:5432 | ||
# Provide the password and db name for postgres | ||
env: | ||
POSTGRES_PASSWORD: 1234 | ||
POSTGRES_DB: ecdar_api | ||
# Set health checks to wait until postgres has started | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: 'true' | ||
|
||
- name: Install dependencies | ||
uses: arduino/setup-protoc@v2 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-on-failure: true | ||
|
||
- name: Run tests | ||
env: | ||
TEST_DATABASE_URL: "postgresql://postgres:1234@postgres:5432/ecdar_api" | ||
run: cargo test -- --test-threads=1 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
[submodule "Ecdar-GUI-Web"] | ||
path = Ecdar-GUI-Web | ||
url = https://github.com/ECDAR-AAU-SW-P5/Ecdar-GUI-Web.git | ||
url = [email protected]:Ecdar/Ecdar-GUI-Web.git | ||
[submodule "Ecdar-ProtoBuf"] | ||
path = Ecdar-ProtoBuf | ||
url = [email protected]:Ecdar/Ecdar-ProtoBuf.git | ||
branch = SW5 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,40 @@ | ||
[workspace] | ||
resolver = "2" | ||
members = [ | ||
"src-tauri", | ||
"ecdar-gui-macros" | ||
] | ||
[package] | ||
name = "ecdar_app" | ||
version = "0.1.0" | ||
description = "A Tauri App" | ||
authors = ["Thomas Krogh Lohse"] | ||
build = "src/build.rs" | ||
license = "" | ||
repository = "" | ||
default-run = "ecdar_app" | ||
edition = "2021" | ||
|
||
|
||
[lib] | ||
proc-macro = true | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[build-dependencies] | ||
tauri-build = { version = "1.4.0", features = [ ] } | ||
tonic-build = "0.11.0" | ||
|
||
[dependencies] | ||
serde_json = "1.0" | ||
serde = { version = "1.0", features = ["derive"] } | ||
tauri = { version = "1.4.0", features = [ "dialog-confirm", "dialog-save", "dialog-open", "fs-read-dir", "fs-create-dir", "fs-remove-dir", "fs-read-file", "fs-write-file", "fs-remove-file", "path-all" ] } | ||
tauri-plugin-persisted-scope = "0.1.3" | ||
tonic = "0.11.0" | ||
prost = "0.12.3" | ||
rand = "0.8.5" | ||
tokio = "1.33.0" | ||
ecdar-protobuf-transpiler = { git = "https://github.com/ECDAR-AAU-SW-P5/Ecdar-ProtoBuf-Transpiler-rs", version = "0.1.0" } | ||
proc-macro2 = "1.0.69" | ||
quote = "1.0.33" | ||
|
||
|
||
[features] | ||
# this feature is used for production builds or when `devPath` points to the filesystem and the built-in dev server is disabled. | ||
# If you use cargo directly instead of tauri's cli you can use this feature flag to switch between tauri's `dev` and `build` modes. | ||
# DO NOT REMOVE!! | ||
custom-protocol = [ "tauri/custom-protocol" ] |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
fn main() { | ||
tonic_build::compile_protos("Ecdar-ProtoBuf/services.proto").unwrap(); | ||
// Tell cargo to invalidate the crate when the protobuf repository changes | ||
println!("cargo:rerun-if-changed=Ecdar-ProtoBuf"); | ||
|
||
tauri_build::build() | ||
} |