Skip to content

Commit

Permalink
Switch back to stable toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
ckoopmann committed Mar 16, 2024
1 parent 4eb8a7c commit 4d3146d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/check-lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,24 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: cargo check
run: cargo +nightly check --all --all-features --benches --tests
run: cargo check --all --all-features --benches --tests

- name: cargo fmt
run: cargo +nightly fmt --all --check
run: cargo fmt --all --check

- name: cargo clippy
run: cargo +nightly clippy --all --all-features --benches --tests
run: cargo clippy --all --all-features --benches --tests

- name: cargo test
run: cargo +nightly test
run: cargo test

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ WORKDIR /app
RUN apt-get update && apt-get -y upgrade && apt-get install -y libclang-dev pkg-config

COPY Cargo.toml Cargo.lock ./
RUN rustup install nightly
RUN mkdir src/
RUN echo "fn main() {}" > dummy.rs
RUN sed -i 's#src/main.rs#dummy.rs#' Cargo.toml
RUN cargo +nightly build --release
RUN cargo build --release

# Build executable.
RUN sed -i 's#dummy.rs#src/main.rs#' Cargo.toml
COPY src ./src
RUN cargo +nightly build --release
RUN cargo build --release

# Build runtime image.
FROM gcr.io/distroless/cc-debian12 AS runtime
Expand Down

0 comments on commit 4d3146d

Please sign in to comment.