Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiemo Bang committed Jun 26, 2023
0 parents commit 1f26b52
Show file tree
Hide file tree
Showing 30 changed files with 10,449 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: CI

on:
push:
branches: [main]
pull_request:
schedule:
- cron: "14 04 * * *" # Daily at 9:14 PM PDT, 8:14 PM PST.

jobs:
pre_job:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/[email protected]
with:
cancel_others: "true"

test:
name: Test
if: ${{ needs.pre_job.outputs.should_skip != 'true' || github.event_name != 'pull_request' }}
timeout-minutes: 10
needs: pre_job
runs-on: ubuntu-latest

steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
components: rustfmt, clippy

- name: Install Action cargo-generate
uses: cargo-generate/[email protected]
with:
name: generated
- name: Move generated project
run: |
mv generated ${{ runner.temp }}/
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --manifest-path "${{ runner.temp }}/generated/Cargo.toml" --all-targets

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path "${{ runner.temp }}/generated/Cargo.toml" --all -- --check

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path "${{ runner.temp }}/generated/Cargo.toml" --all --all-targets -- -D warnings

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path "${{ runner.temp }}/generated/Cargo.toml" --all-targets --no-fail-fast
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
51 changes: 51 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'sky-pie-precomputer'",
"cargo": {
"args": [
"build",
"--bin=sky-pie-precomputer",
"--package=sky-pie-precomputer"
],
"filter": {
"name": "sky-pie-precomputer",
"kind": "bin"
}
},
"args": ["-r=aws",
"-n=network_cost_v2.csv",
"-s=storage_pricing.csv",
"-b=200",
"--rf=3",
"-o=out.txt"
],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'sky-pie-precomputer'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=sky-pie-precomputer",
"--package=sky-pie-precomputer"
],
"filter": {
"name": "sky-pie-precomputer",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
}
]
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"rust-analyzer.linkedProjects": [
//"./Cargo.toml"
]
}
Loading

0 comments on commit 1f26b52

Please sign in to comment.