Skip to content

Commit

Permalink
Merge pull request #41 from Xu-Mj/rebuild_err
Browse files Browse the repository at this point in the history
Rebuild error
  • Loading branch information
Xu-Mj authored Jul 28, 2024
2 parents 03749a7 + 0a9edd3 commit e595c08
Show file tree
Hide file tree
Showing 26 changed files with 565 additions and 729 deletions.
61 changes: 31 additions & 30 deletions .github/workflows/rust_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
key: ${{ runner.os }}-lint-${{ hashFiles('**/Cargo.lock') }}

- name: Cache | Protoc
id: cache_protoc
uses: actions/cache@v3
with:
path: /opt/protoc
Expand All @@ -36,18 +37,8 @@ jobs:
wget https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protoc-23.4-linux-x86_64.zip
unzip protoc-23.4-linux-x86_64.zip -d /opt/protoc
- name: Cache | Dependencies
uses: actions/cache@v3
with:
path: /usr/local/include/librdkafka
key: librdkafka-dev-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: librdkafka-dev-${{ runner.os }}-

- name: Install | Dependencies
if: steps.cache_dependencies.outputs.cache-hit != 'true'
run: |
sudo apt update
sudo apt install -y librdkafka-dev
- name: Add Protoc to PATH
run: echo "/opt/protoc/bin" >> $GITHUB_PATH

- name: Setup | Install rustup
run: |
Expand Down Expand Up @@ -82,11 +73,6 @@ jobs:
- name: Setup | Checkout
uses: actions/checkout@v4

- name: Setup | Install rustup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
- name: Setup | Cache Cargo
uses: actions/cache@v4
with:
Expand All @@ -97,6 +83,33 @@ jobs:
target/
key: ${{ runner.os }}-check-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}

- name: Cache | Protoc
id: cache_protoc_check
uses: actions/cache@v3
with:
path: /opt/protoc
key: protoc-${{ runner.os }}-23.x
restore-keys: protoc-${{ runner.os }}-

- name: Install | Protoc
if: steps.cache_protoc_check.outputs.cache-hit != 'true'
run: |
mkdir -p /opt/protoc
cd /opt/protoc
wget https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protoc-23.4-linux-x86_64.zip
unzip protoc-23.4-linux-x86_64.zip -d /opt/protoc
- name: Add Protoc to PATH
run: echo "/opt/protoc/bin" >> $GITHUB_PATH

- name: Set PROTOC environment variable
run: echo "PROTOC=/opt/protoc/bin/protoc" >> $GITHUB_ENV

- name: Setup | Install rustup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
- name: Setup | Disable rustup self-update
run: |
rustup set auto-self-update disable
Expand All @@ -107,16 +120,4 @@ jobs:
rustup default ${{ matrix.rust }}
- name: Build | Check
run: cargo check --all

- name: Setup | binstall
run: |
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
- name: Setup | check-all-features
run: |
cargo binstall -y cargo-all-features
- name: Build | Check all features
run: |
cargo check-all-features
run: cargo check --no-default-features --features=static
1 change: 1 addition & 0 deletions abi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ edition = "2021"


[dependencies]
aws-sdk-s3 = { version = "1.4.0", features = ["rt-tokio"] }
axum = "0.7.4"
bincode = "1.3.3"
bytes = "1"
Expand Down
4 changes: 2 additions & 2 deletions abi/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ pub struct OAuth2Item {

impl Config {
pub fn load(filename: impl AsRef<Path>) -> Result<Self, Error> {
let content = fs::read_to_string(filename).map_err(|_| Error::ConfigReadError)?;
serde_yaml::from_str(&content).map_err(Error::ConfigParseError)
let content = fs::read_to_string(filename)?;
Ok(serde_yaml::from_str(&content)?)
}
}

Expand Down
Loading

0 comments on commit e595c08

Please sign in to comment.