Skip to content

Commit

Permalink
Add build to ci (#97)
Browse files Browse the repository at this point in the history
* Add build to ci

* Fix derive crate build
  • Loading branch information
ncpenke committed Feb 9, 2023
1 parent 8778f10 commit 82ce45f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,22 @@ on:
- main

jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: "build all"
# We keep these separate since sometimes the derive fails when
# independently built.
run: |
cargo build -p arrow2_convert_derive
cargo build -p arrow2_convert
cargo build -p arrow2_convert_example_simple
clippy:
name: Clippy
runs-on: ubuntu-latest
Expand Down
7 changes: 0 additions & 7 deletions arrow2_convert_derive/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,20 @@ pub const UNION_TYPE_SPARSE: &str = "sparse";
pub const UNION_TYPE_DENSE: &str = "dense";
pub const TRANSPARENT: &str = "transparent";

#[derive(Debug)]
pub struct DeriveCommon {
/// The input name
pub name: Ident,
/// The overall visibility
pub visibility: Visibility,
}

#[derive(Debug)]
pub struct DeriveStruct {
pub common: DeriveCommon,
/// The list of fields in the struct
pub fields: Vec<DeriveField>,
pub is_transparent: bool,
}

#[derive(Debug)]
pub struct DeriveEnum {
pub common: DeriveCommon,
/// The list of variants in the enum
Expand All @@ -36,27 +33,23 @@ pub struct DeriveEnum {
}

/// All container attributes
#[derive(Debug)]
pub struct ContainerAttrs {
pub is_dense: Option<bool>,
pub transparent: Option<Span>,
}

/// All field attributes
#[derive(Debug)]
pub struct FieldAttrs {
pub field_type: Option<syn::Type>,
pub skip: bool,
}

#[derive(Debug)]
pub struct DeriveField {
pub syn: syn::Field,
pub field_type: syn::Type,
pub skip: bool,
}

#[derive(Debug)]
pub struct DeriveVariant {
pub syn: syn::Variant,
pub field_type: syn::Type,
Expand Down

0 comments on commit 82ce45f

Please sign in to comment.