Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Modernize CI #2487

Merged
merged 6 commits into from
Jan 3, 2025
Merged

Conversation

AaronDewes
Copy link
Contributor

@AaronDewes AaronDewes commented Jan 3, 2025

This

  • Updates the GitHub actions workflows with modern versions
  • Updates the base image of the Docker container to Debian 12
  • Sets up caching for faster Docker builds
  • Fix the invalid dependency issue

Copy link

netlify bot commented Jan 3, 2025

Deploy Preview for specter-desktop-docs canceled.

Name Link
🔨 Latest commit 0243a74
🔍 Latest deploy log https://app.netlify.com/sites/specter-desktop-docs/deploys/677824d5afe8d500087e1a4e

Copy link
Contributor Author

@AaronDewes AaronDewes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Short explanations of the main changes

Comment on lines -23 to +31
COPY . .
COPY requirements.txt .

RUN pip3 install --upgrade pip
RUN pip3 install babel cryptography
RUN pip3 install .
RUN pip3 install -r requirements.txt

COPY . .

RUN pip3 install . --no-deps
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main part of this fix, which is a change in the order deps are installed.

It also makes builds faster as a side effect.

Comment on lines -12 to +17
FROM python:3.10-slim-bullseye AS builder
FROM python:3.10-bookworm AS builder

ARG VERSION
ARG REPO

RUN apt update && apt install -y git build-essential libusb-1.0-0-dev libudev-dev libffi-dev libssl-dev rustc cargo libpq-dev
RUN apt update && apt install -y git libusb-1.0-0-dev libudev-dev libffi-dev libssl-dev rustc cargo libpq-dev
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also just a build speed optimization, instead of using the slim image, just use the non-slim image during build, which has most packages we need for building preinstalled.

Comment on lines +42 to +43
--cache-from type=gha \
--cache-to type=gha,mode=max \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This enables caching.

Copy link
Collaborator

@moneymanolis moneymanolis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for this! Tested locally as well.

@moneymanolis moneymanolis merged commit db39a67 into cryptoadvance:master Jan 3, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants