Unverified Commit 647b213e authored by Nugine's avatar Nugine
Browse files

ci: check codegen

parent 0786f8d5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -30,3 +30,6 @@ jobs:
      - run: cargo fmt --all -- --check
      - run: cargo clippy -- -D warnings
      - run: cargo test --all-features
      - run: |
          ./scripts/codegen.sh
          [[ -z $(git status -s) ]] # Fail if changed. See https://stackoverflow.com/a/9393642
+2 −13
Original line number Diff line number Diff line
@@ -10,21 +10,10 @@ doc:
    cargo doc --open --no-deps --all-features

download-model:
    #!/bin/bash -e
    mkdir -p target
    F="target/s3.json"
    COMMIT=2e49e06ecb041afaf3fbed5a4a4f6c6afbb052fa
    URL=https://github.com/awslabs/aws-sdk-rust/raw/$COMMIT/aws-models/s3.json
    wget --output-document $F $URL
    ./scripts/download-model.sh

codegen:
    #!/bin/bash -e
    F="target/s3.json"
    if [ ! -f $F ]; then
        just download-model
    fi
    cargo run -p s3s-codegen -- $F
    cargo fmt
    ./scripts/codegen.sh

install:
    cargo install --offline --path crates/s3s-fs --features binary

scripts/codegen.sh

0 → 100755
+7 −0
Original line number Diff line number Diff line
#!/bin/bash -e
F="target/s3.json"
if [ ! -f $F ]; then
    ./scripts/download-model.sh
fi
cargo run -p s3s-codegen -- $F
cargo fmt
+6 −0
Original line number Diff line number Diff line
#!/bin/bash -e
mkdir -p target
F="target/s3.json"
COMMIT=2e49e06ecb041afaf3fbed5a4a4f6c6afbb052fa
URL=https://github.com/awslabs/aws-sdk-rust/raw/$COMMIT/aws-models/s3.json
wget --output-document $F $URL