Skip to content

Commit

Permalink
remove dependency on rust 1.81 and optimize docker for layer caching
Browse files Browse the repository at this point in the history
  • Loading branch information
nudded committed Nov 1, 2024
1 parent 7b95c8d commit 157a254
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 16 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/migrations-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,11 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust
run: rustup default 1.81
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.4'
- name: Run bundle isntall
run: bundle install
bundler-cache: true
- name: Start Clickhouse database
run: |
docker run -d --rm -p 8123:8123 -p 9000:9000 --ulimit nofile=262144:262144 -v ./clickhouse-s3:/var/lib/clickhouse-s3 -v ./ci/clickhouse/config.xml:/etc/clickhouse-server/config.d/config.xml clickhouse/clickhouse-server
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/pronto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust
run: rustup default 1.81
- name: Setup Ruby
uses: ruby/setup-ruby@v1
- name: Setup Rubocop
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust
run: rustup default 1.81
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ FROM ruby:3.3.4-slim AS build

WORKDIR /app

RUN apt update -qq && apt install nodejs curl build-essential git pkg-config libpq-dev libclang-dev curl -y && \
curl https://sh.rustup.rs -sSf | bash -s -- -y

COPY ./Gemfile /app/Gemfile
COPY ./Gemfile.lock /app/Gemfile.lock

RUN apt update -qq && apt install nodejs curl build-essential git pkg-config libpq-dev libclang-dev curl -y && \
curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain 1.81

ENV BUNDLER_VERSION='2.5.5'
ENV PATH="$PATH:/root/.cargo/bin/"
RUN gem install bundler --no-document -v '2.5.5'
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ FROM ruby:3.3.4-slim

WORKDIR /app

COPY ./Gemfile /app/Gemfile
COPY ./Gemfile.lock /app/Gemfile.lock

RUN apt update -qq && \
apt install nodejs build-essential curl git pkg-config libpq-dev libclang-dev -y && \
curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain 1.81
curl https://sh.rustup.rs -sSf | bash -s -- -y

ENV BUNDLER_VERSION='2.5.5'
ENV PATH="$PATH:/root/.cargo/bin/"

COPY ./Gemfile /app/Gemfile
COPY ./Gemfile.lock /app/Gemfile.lock

RUN gem install bundler --no-document -v '2.5.5'

RUN bundle config build.nokogiri --use-system-libraries && \
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/getlago/lago-expression.git
revision: 76a676544ee71f9476d8c6d7b6bb20a254ac2a90
revision: a096edf11524bfda7d7f196ddb7722b6c5b8eeae
glob: expression-ruby/lago-expression.gemspec
specs:
lago-expression (0.0.1)
Expand Down

0 comments on commit 157a254

Please sign in to comment.