Skip to content

Commit

Permalink
add docs deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
philiplinden committed Feb 17, 2024
1 parent 027301f commit 69d08c2
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 28 deletions.
112 changes: 112 additions & 0 deletions .github/workflows/cargo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: Cargo Build, Test & Doc

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always
RUST_LOG: info

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Restore cargo cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Cargo Check
run: cargo check
- name: Cargo Build
run: cargo build --release --all-features
test:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Restore cargo cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
doc:
runs-on: ubuntu-latest
needs:
- build
- test
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Restore cargo cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Cargo Doc
run: cargo doc --no-deps --target-dir=docs
- uses: actions/upload-artifact@v3
with:
name: docs
path: docs
deploy:
if: github.ref == 'refs/heads/main'
needs: doc
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/download-artifact@v3
with:
name: docs
path: docs
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
if: github.event_name != 'pull_request'
23 changes: 0 additions & 23 deletions .github/workflows/rust.yml

This file was deleted.

1 change: 0 additions & 1 deletion src/simulator/balloon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ pub const RUBBER: Material = Material {
specific_heat: 1490.0,
poissons_ratio: 0.5,
elasticity: 4_000_000.0,
// max_strain: 8.0,
max_strain: 8.0,
max_stress: 25_000_000.0,
};
Expand Down
6 changes: 3 additions & 3 deletions src/simulator/payload.rs → src/simulator/bus.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ----------------------------------------------------------------------------
// Payload
// -------
// Properties and functions of the balloon's payload and avionics
// Bus
// ---
// Properties and functions of the balloon's structure and avionics busses
// ----------------------------------------------------------------------------

pub struct Bus {

Check failure on line 7 in src/simulator/bus.rs

View workflow job for this annotation

GitHub Actions / build

struct `Bus` is never constructed
Expand Down
2 changes: 1 addition & 1 deletion src/simulator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mod constants;
mod forces;
mod gas;
mod heat;
mod payload;
mod bus;

use log::{debug, error, info, warn};
use std::{
Expand Down

0 comments on commit 69d08c2

Please sign in to comment.