Skip to content

Commit f39acdd

Browse files
Merge pull request #31 from OSCPS-Project/develop
Just want to update the main branch with some of the work we have done since it hasn't ever been updated since the start of the project...
2 parents 90d88ad + d918aa3 commit f39acdd

29 files changed

+2747
-17
lines changed

.github/workflows/check-docs.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Clippy and Documentation Check
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- develop
8+
release:
9+
types: [published]
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v3
18+
19+
- name: Cache Cargo registry and git
20+
uses: actions/cache@v3
21+
with:
22+
path: |
23+
~/.cargo/registry
24+
~/.cargo/git
25+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
26+
restore-keys: |
27+
${{ runner.os }}-cargo-registry-
28+
29+
- name: Cache target directory
30+
uses: actions/cache@v3
31+
with:
32+
path: target
33+
key: ${{ runner.os }}-target-${{ hashFiles('**/Cargo.lock') }}
34+
restore-keys: |
35+
${{ runner.os }}-target-
36+
37+
- name: Install system dependencies
38+
run: |
39+
sudo apt-get update
40+
sudo apt-get install -y \
41+
build-essential \
42+
curl \
43+
wget \
44+
file \
45+
libssl-dev \
46+
libgtk-3-dev \
47+
libayatana-appindicator3-dev \
48+
librsvg2-dev
49+
50+
- name: Set up Rust
51+
uses: actions-rs/toolchain@v1
52+
with:
53+
toolchain: stable
54+
override: true
55+
56+
- name: Install Clippy
57+
run: rustup component add clippy
58+
59+
- name: Run Clippy with Documentation Lints
60+
run: cargo clippy -- -D warnings
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Generate and Deploy Rust Docs
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
rust-docs:
10+
name: Generate Rust Documentation
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Install Rust
18+
uses: dtolnay/rust-toolchain@stable
19+
20+
- name: Generate documentation
21+
run: cargo doc --no-deps
22+
23+
- name: Deploy to GitHub Pages
24+
if: github.ref == 'refs/heads/main'
25+
uses: peaceiris/actions-gh-pages@v4
26+
with:
27+
github_token: ${{ secrets.GITHUB_TOKEN }}
28+
publish_dir: ./target/doc

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: OSCPS_Release_Workflow
2+
3+
on:
4+
workflow_dispatch: # Enables manual triggering from GitHub Actions UI
5+
6+
jobs:
7+
build:
8+
name: Build and Release
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Install Rust
16+
uses: dtolnay/rust-toolchain@stable
17+
18+
- name: Build release binary
19+
run: cargo build --release
20+
21+
- name: Compress binary
22+
run: |
23+
mkdir -p release
24+
cp target/release/your-binary-name release/
25+
cd release
26+
tar -czvf your-binary-name-linux.tar.gz your-binary-name
27+
shell: bash
28+
29+
- name: Create GitHub Release and Upload Binary
30+
uses: softprops/action-gh-release@v2
31+
with:
32+
files: release/your-binary-name-linux.tar.gz
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+

.github/workflows/rust-tests.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Rust Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- develop
8+
release:
9+
types: [published]
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
rust: [stable]
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v3
21+
22+
- name: Cache Cargo registry and git
23+
uses: actions/cache@v3
24+
with:
25+
path: |
26+
~/.cargo/registry
27+
~/.cargo/git
28+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
29+
restore-keys: |
30+
${{ runner.os }}-cargo-registry-
31+
32+
- name: Cache target directory
33+
uses: actions/cache@v3
34+
with:
35+
path: target
36+
key: ${{ runner.os }}-target-${{ hashFiles('**/Cargo.lock') }}
37+
restore-keys: |
38+
${{ runner.os }}-target-
39+
40+
- name: Install system dependencies
41+
run: |
42+
sudo apt-get update
43+
sudo apt-get install -y \
44+
build-essential \
45+
curl \
46+
wget \
47+
file \
48+
libssl-dev \
49+
libgtk-3-dev \
50+
libayatana-appindicator3-dev \
51+
librsvg2-dev
52+
53+
- name: Set up Rust
54+
uses: actions-rs/toolchain@v1
55+
with:
56+
toolchain: ${{ matrix.rust }}
57+
override: true
58+
59+
- name: Install Rust dependencies
60+
run: cargo build --release
61+
62+
- name: Run tests
63+
run: cargo test --all

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
/target
2+
.DS_Store
3+
oscps-gui/bun.lockb
4+
Cargo.lock

Cargo.lock

Lines changed: 0 additions & 7 deletions
This file was deleted.

Cargo.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
[package]
2-
name = "oscps"
3-
version = "0.1.0"
4-
edition = "2021"
1+
[workspace]
2+
resolver = "2"
53

6-
[dependencies]
4+
members = [
5+
"oscps-gui",
6+
"oscps-lib",
7+
]

0 commit comments

Comments
 (0)