From ffb7c946547f238e7f80e00387ad4c7725ab8610 Mon Sep 17 00:00:00 2001 From: Fuxing Loh <4266087+fuxingloh@users.noreply.github.com> Date: Mon, 18 Mar 2024 22:41:31 +0800 Subject: [PATCH] chore: bump to 1.17.26 (#7) * chore: bump to 1.17.26 * fixes * pre-run the build:docker step * fix ci.yml --- .github/workflows/ci.yml | 6 ++++++ .github/workflows/release.yml | 5 ++++- .idea/dictionaries/fuxing.xml | 1 + packages/solana-container/Dockerfile | 13 +++++++++---- packages/solana-container/version.js | 2 +- packages/solana-testcontainers/index.ts | 2 +- packages/solana-testcontainers/package.json | 2 +- 7 files changed, 23 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5136398..c35b504 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,9 @@ concurrency: permissions: contents: read +env: + BUILDKIT_PROGRESS: plain + jobs: build: name: Build @@ -44,6 +47,9 @@ jobs: - run: pnpm install --frozen-lockfile + # Pre-run build steps, required for the test step + - run: pnpm --filter=solana-container run build:docker + - run: pnpm turbo run test lint_prettier: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c27b14e..6ab7057 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,9 @@ on: permissions: contents: read +env: + BUILDKIT_PROGRESS: plain + jobs: version: runs-on: ubuntu-latest @@ -96,4 +99,4 @@ jobs: - run: pnpm -r exec npm version ${{ needs.version.outputs.result }} --git-tag-version=false - - run: pnpm turbo run push:docker --filter=${{ matrix.package }} + - run: pnpm --filter=${{ matrix.package }} run push:docker diff --git a/.idea/dictionaries/fuxing.xml b/.idea/dictionaries/fuxing.xml index b46192e..dab24b6 100644 --- a/.idea/dictionaries/fuxing.xml +++ b/.idea/dictionaries/fuxing.xml @@ -1,6 +1,7 @@ + buildkit caip fuxing fuxingloh diff --git a/packages/solana-container/Dockerfile b/packages/solana-container/Dockerfile index dd9ae6d..7a4cc77 100644 --- a/packages/solana-container/Dockerfile +++ b/packages/solana-container/Dockerfile @@ -1,8 +1,8 @@ -FROM debian:bullseye as builder +FROM debian:bookworm as builder # Install os deps RUN apt update && \ - apt-get install -y build-essential clang cmake curl libudev-dev pkg-config && \ + apt-get install -y build-essential clang cmake curl libudev-dev pkg-config protobuf-compiler && \ rm -rf /var/lib/apt/lists/* # Setup rust @@ -17,14 +17,19 @@ RUN curl https://codeload.github.com/solana-labs/solana/tar.gz/refs/tags/v$SOLAN RUN mv solana-$SOLANA_VERSION /workspace/solana WORKDIR /workspace/solana +RUN cargo fetch + +# Do not optimize the build to reduce the build time, since this is testcontainers not to be used in production. +ENV RUSTFLAGS="-C opt-level=0" RUN cargo build --bin solana-test-validator --release -FROM debian:bullseye as final +FROM debian:bookworm as runner RUN apt update && \ - apt-get install -y bzip2 && \ + apt-get install -y bzip2 libssl-dev && \ rm -rf /var/lib/apt/lists/* COPY --from=builder /workspace/solana/target/release/solana-test-validator /bin/solana-test-validator +EXPOSE 8899 8900 CMD ["solana-test-validator"] diff --git a/packages/solana-container/version.js b/packages/solana-container/version.js index 557a501..787dc6d 100644 --- a/packages/solana-container/version.js +++ b/packages/solana-container/version.js @@ -1,4 +1,4 @@ // renovate: datasource=github-releases depName=solana-labs/solana -const SOLANA_VERSION = '1.10.38'; +const SOLANA_VERSION = '1.17.26'; module.exports = SOLANA_VERSION; diff --git a/packages/solana-testcontainers/index.ts b/packages/solana-testcontainers/index.ts index 80ed709..3716c0e 100644 --- a/packages/solana-testcontainers/index.ts +++ b/packages/solana-testcontainers/index.ts @@ -1,7 +1,7 @@ import { AbstractStartedContainer, GenericContainer, StartedTestContainer, Wait } from 'testcontainers'; // renovate: datasource=github-releases depName=solana-labs/solana -const SOLANA_VERSION = '1.10.38'; +const SOLANA_VERSION = '1.17.26'; export class SolanaContainer extends GenericContainer { constructor(image: string = `ghcr.io/fuxingloh/solana-container:${SOLANA_VERSION}`) { diff --git a/packages/solana-testcontainers/package.json b/packages/solana-testcontainers/package.json index 054c836..dede942 100644 --- a/packages/solana-testcontainers/package.json +++ b/packages/solana-testcontainers/package.json @@ -17,7 +17,7 @@ "build": "tsc --project tsconfig.build.json", "clean": "tsc --build --clean", "lint": "eslint .", - "test": "jest --passWithNoTests" + "test": "jest --passWithNoTests --forceExit" }, "lint-staged": { "*": [