-
Notifications
You must be signed in to change notification settings - Fork 373
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
Switch ci_docker to a container based on ubuntu 20.04 #1334
Merged
Merged
Changes from 7 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
9dca4aa
Create a 20.04-based dockerfile with rust and all our required packages
jleibs 7f70695
Use the new docker container from ci jobs, including the wheel builder
jleibs 86d78c3
Force manylinux_2_31
jleibs cf97d1e
Actually use the new container
jleibs afb6182
Understanding how matrix jobs actually work
jleibs 0ba4f9e
Use the right docker container name
jleibs 503a316
Rev version on the apt cache since this is a different version of Ubuntu
jleibs e87a992
Add sudo to the package since it's used in scripts
jleibs c6c48fa
And lsb-release
jleibs 1bd2d25
Don't use the pip cache / setup python on linux
jleibs c68e996
Don't use pip install rerun_py/
jleibs 12d368a
Install newer binaryen
jleibs e183a8f
Can't run setup_web.sh on ubuntu 20.04 because binaryen is too old
jleibs 338710c
missing / for wheel pack
jleibs b80c103
Install from the correct location
jleibs 858d14d
Upgrade pip
jleibs 4197ade
python -> python3
jleibs f3412bc
Try replacing wildcard with captured package folder
jleibs 2e87640
Tweak Dockerfile comments
jleibs 3903e89
Update ci_docker/Dockerfile
jleibs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,7 +90,7 @@ jobs: | |
matrix+=('{"platform": "macos", "runs_on": "macos-latest"},') | ||
fi | ||
matrix+=('{"platform": "windows", "runs_on": "windows-latest-8-cores"},') | ||
matrix+=('{"platform": "linux", "runs_on": "ubuntu-latest-16-cores"}') | ||
matrix+=('{"platform": "linux", "runs_on": "ubuntu-latest-16-cores", container: {"image": "rerunio/ci_docker:0.5"}}') | ||
|
||
echo "Matrix values: ${matrix[@]}" | ||
|
||
|
@@ -105,15 +105,20 @@ jobs: | |
|
||
runs-on: ${{ matrix.runs_on }} | ||
|
||
container: ${{ matrix.container }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# These should already be in the docker container, but run for good measure. A no-op install | ||
# should be fast, and this way things don't break if we add new packages without rebuilding | ||
# docker | ||
- name: Cache APT Packages | ||
if: matrix.platform == 'linux' | ||
uses: awalsh128/[email protected] | ||
with: | ||
packages: ${{ env.UBUNTU_REQUIRED_PKGS }} | ||
version: 1.0 | ||
version: 2.0 # Increment this to pull newer packages | ||
execute_install_scripts: true | ||
|
||
- name: Set up cargo cache | ||
|
@@ -125,6 +130,9 @@ jobs: | |
# the cache. Better cross-job sequencing would be nice here | ||
save-if: False | ||
|
||
# These should already be in the docker container, but run for good measure. A no-op install | ||
# should be fast, and this way things don't break if we add new packages without rebuilding | ||
# docker | ||
- name: Setup python | ||
uses: actions/setup-python@v4 | ||
with: | ||
|
@@ -204,7 +212,7 @@ jobs: | |
uses: PyO3/maturin-action@v1 | ||
with: | ||
maturin-version: "0.14.10" | ||
manylinux: auto | ||
manylinux: manylinux_2_31 | ||
container: off | ||
command: build | ||
args: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
FROM rust:1.67 | ||
FROM ubuntu:20.04 | ||
LABEL maintainer="[email protected]" | ||
# Remember to update the version in publish.sh | ||
# TODO(jleibs) use this version in the publish.sh script and below in the CACHE_KEY | ||
LABEL version="0.4" | ||
LABEL version="0.5" | ||
LABEL description="Docker image used for the CI of https://github.com/rerun-io/rerun" | ||
|
||
# Install some cargo tools we know we'll always need | ||
# We do this first in its own layer because the layer is quite large (500MB+) | ||
# And updating the crates.io index is one of the slower steps | ||
RUN cargo install cargo-deny && \ | ||
cargo install cargo-cranky | ||
ENV foo=1 | ||
jleibs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# Install the ubuntu package dependencies | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
binaryen \ | ||
build-essential \ | ||
curl \ | ||
git \ | ||
libatk-bridge2.0 \ | ||
libfontconfig1-dev \ | ||
libfreetype6-dev \ | ||
|
@@ -24,10 +24,40 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ | |
libxcb-shape0-dev \ | ||
libxcb-xfixes0-dev \ | ||
libxkbcommon-dev \ | ||
patchelf \ | ||
python3-pip && \ | ||
python3-pip \ | ||
wget && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# We need a more modern patchelf than ships on ubuntu | ||
RUN curl -L https://github.com/NixOS/patchelf/releases/download/0.17.2/patchelf-0.17.2-x86_64.tar.gz | tar -xz ./bin/patchelf | ||
|
||
ENV RUSTUP_HOME=/usr/local/rustup \ | ||
CARGO_HOME=/usr/local/cargo \ | ||
PATH=/usr/local/cargo/bin:$PATH \ | ||
RUST_VERSION=1.67 \ | ||
RUSTUP_VERSION=1.25.2 | ||
|
||
# Borrowed from: https://github.com/rust-lang/docker-rust/blob/master/1.67.1/bookworm/Dockerfile | ||
jleibs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
RUN set -eux; \ | ||
rustArch='x86_64-unknown-linux-gnu'; \ | ||
rustupSha256='bb31eaf643926b2ee9f4d8d6fc0e2835e03c0a60f34d324048aa194f0b29a71c'; \ | ||
url="https://static.rust-lang.org/rustup/archive/${RUSTUP_VERSION}/${rustArch}/rustup-init"; \ | ||
wget "$url"; \ | ||
echo "${rustupSha256} *rustup-init" | sha256sum -c -; \ | ||
chmod +x rustup-init; \ | ||
./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION --default-host ${rustArch}; \ | ||
rm rustup-init; \ | ||
chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \ | ||
rustup --version; \ | ||
cargo --version; \ | ||
rustc --version; | ||
|
||
# Install some cargo tools we know we'll always need | ||
# We do this first in its own layer because the layer is quite large (500MB+) | ||
# And updating the crates.io index is one of the slower steps | ||
RUN cargo install cargo-deny && \ | ||
cargo install cargo-cranky | ||
|
||
# Install the python build dependencies | ||
ADD rerun_py/requirements-build.txt requirements-build.txt | ||
RUN pip install -r requirements-build.txt | ||
|
@@ -36,7 +66,7 @@ RUN pip install -r requirements-build.txt | |
RUN cargo install [email protected] | ||
|
||
# Increment this to invalidate cache | ||
ENV CACHE_KEY=rerun_docker_v0.4 | ||
ENV CACHE_KEY=rerun_docker_v0.5 | ||
|
||
# See: https://github.com/actions/runner-images/issues/6775#issuecomment-1410270956 | ||
RUN git config --system --add safe.directory '*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh that's cool that this falls through to "no container" if the value doesn't exist in the matrix