Skip to content

Commit

Permalink
Merge pull request #117 from willglynn/github-actions-ci
Browse files Browse the repository at this point in the history
Use GitHub Actions for CI
  • Loading branch information
jan-auer authored Jun 2, 2022
2 parents 36b0bf8 + 6b5a08e commit f298300
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 27 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: CI

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

env:
CARGO_TERM_COLOR: always

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: clippy, rustfmt, rust-docs
override: true

- uses: swatinem/rust-cache@v1

- name: Run Rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

- name: Run Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets --all-features -- -D warnings

- name: Rust Doc Comments
uses: actions-rs/cargo@v1
env:
RUSTDOCFLAGS: -Dwarnings
with:
command: doc
args: --no-deps --document-private-items

test:
name: Test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- uses: swatinem/rust-cache@v1

- name: Run Cargo Tests
uses: actions-rs/cargo@v1
with:
command: test
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

12 changes: 7 additions & 5 deletions src/dbi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,9 @@ impl From<u32> for HeaderVersion {
}

/// A DBI header -- `NewDBIHdr`, really -- parsed from a stream.
///
/// Reference:
/// https://github.com/Microsoft/microsoft-pdb/blob/082c5290e5aff028ae84e43affa8be717aa7af73/PDB/dbi/dbi.h#L124
/// <https://github.com/Microsoft/microsoft-pdb/blob/082c5290e5aff028ae84e43affa8be717aa7af73/PDB/dbi/dbi.h#L124>
#[derive(Debug, Copy, Clone)]
#[allow(dead_code)] // reason = "unused fields added for completeness"
pub(crate) struct DBIHeader {
Expand Down Expand Up @@ -415,9 +416,10 @@ impl DBISectionContribution {
}
}

/// Information about a module parsed from the DBI stream. Named `MODI` in
/// the Microsoft PDB source:
/// https://github.com/Microsoft/microsoft-pdb/blob/082c5290e5aff028ae84e43affa8be717aa7af73/PDB/dbi/dbi.h#L1197
/// Information about a module parsed from the DBI stream.
///
/// Named `MODI` in the Microsoft PDB source:
/// <https://github.com/Microsoft/microsoft-pdb/blob/082c5290e5aff028ae84e43affa8be717aa7af73/PDB/dbi/dbi.h#L1197>
#[derive(Debug, Copy, Clone)]
#[allow(dead_code)] // reason = "unused fields added for completeness"
pub(crate) struct DBIModuleInfo {
Expand All @@ -427,7 +429,7 @@ pub(crate) struct DBIModuleInfo {
pub section: DBISectionContribution,
/// Flags, expressed as bitfields in the C struct:
/// written, EC enabled, unused, tsm
/// https://github.com/Microsoft/microsoft-pdb/blob/082c5290e5aff028ae84e43affa8be717aa7af73/PDB/dbi/dbi.h#L1201-L1204
/// <https://github.com/Microsoft/microsoft-pdb/blob/082c5290e5aff028ae84e43affa8be717aa7af73/PDB/dbi/dbi.h#L1201-L1204>
pub flags: u16,
/// Stream number of module debug info (syms, lines, fpo).
pub stream: StreamIndex,
Expand Down
3 changes: 2 additions & 1 deletion src/msf/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ mod big {
pub const MAGIC: &[u8] = b"Microsoft C/C++ MSF 7.00\r\n\x1a\x44\x53\x00\x00\x00";

/// The PDB header as stored on disk.
/// See the Microsoft code for reference: https://github.com/Microsoft/microsoft-pdb/blob/082c5290e5aff028ae84e43affa8be717aa7af73/PDB/msf/msf.cpp#L946
///
/// See the Microsoft code for reference: <https://github.com/Microsoft/microsoft-pdb/blob/082c5290e5aff028ae84e43affa8be717aa7af73/PDB/msf/msf.cpp#L946>
#[repr(C)]
#[derive(Debug, Copy, Clone)]
struct RawHeader {
Expand Down

0 comments on commit f298300

Please sign in to comment.