Skip to content

Commit

Permalink
Add github actions for build
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimach authored Jul 25, 2024
2 parents ec5c42c + d9074f6 commit d7adaac
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Rust

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

env:
CARGO_TERM_COLOR: always

jobs:
build-linux:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Build (Debug)
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Build (release)
run: cargo build --target x86_64-unknown-linux-gnu --release
- uses: actions/upload-artifact@v4
with:
name: Linux Build
path: target/x86_64-unknown-linux-gnu/release/rtracy

build-windows:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Build (Debug)
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Build (release)
run: cargo build --target x86_64-pc-windows-msvc --release
- uses: actions/upload-artifact@v4
with:
name: Windows Build
path: target/x86_64-pc-windows-msvc/release/rtracy.exe
5 changes: 5 additions & 0 deletions src/structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,27 +133,31 @@ impl Decode for EventType {
}

#[derive(Decode, Copy, Clone, Debug)]
#[allow(dead_code)]
pub struct EventZoneBegin {
pub thread_id: u32,
pub source_location: u32,
pub timestamp: u64,
}

#[derive(Decode, Copy, Clone, Debug)]
#[allow(dead_code)]
pub struct EventZoneEnd {
pub thread_id: u32,
_padding: u32,
pub timestamp: u64,
}

#[derive(Decode, Copy, Clone, Debug)]
#[allow(dead_code)]
pub struct EventZoneColor {
pub thread_id: u32,
pub color: [u8; 4],
pub padding: u64,
}

#[derive(Decode, Copy, Clone, Debug)]
#[allow(dead_code)]
pub struct EventFrameMark {
pub name: u32,
_padding: u32,
Expand Down Expand Up @@ -226,6 +230,7 @@ pub struct NetworkHeader {
}

#[derive(Decode, Debug)]
#[allow(dead_code)]
pub struct NetworkQuery {
pub query_type: ServerQueryType,
pub pointer: u64,
Expand Down

0 comments on commit d7adaac

Please sign in to comment.