-
Notifications
You must be signed in to change notification settings - Fork 7
feat: add rust container flavor #351
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
83d7e43
feat: add rust container flavor
rjaegers 6903799
ci: fix linter findings
rjaegers d1de73e
Merge commit '8653908d77e6bf47652fce63ac10c1275999ea21' into feature/…
rjaegers a8e77e9
ci: ignore some linter findings
rjaegers 0c5ea47
ci: run for all flavours
rjaegers 1ee4e43
ci: fix tests for rust container flavor
rjaegers 51d825d
Merge commit 'e25462503773386be342066d81c04bf25451e0c3' into feature/…
rjaegers 27be8ef
chore: add pkg-config
rjaegers 54e9106
ci: fix linter findings
rjaegers 945ade2
Merge branch 'main' into feature/add-rust-container-flavor
rjaegers a63dc83
chore: modify build and push workflow for flavors
rjaegers ddfd6fb
Merge branch 'feature/add-rust-container-flavor' of https://github.co…
rjaegers 1c7ec58
chore: reduce container size
rjaegers 1a4ff0d
chore: add Docker extension to devcontainer.json
rjaegers b3f060c
Merge commit 'aa28065477dd5a4da08f8ed882382467d362f1b5' into feature/…
rjaegers 87fd45a
chore: update rust from 1.76.0 to 1.77.2
rjaegers 02c8814
ci: publish result of all testsuites
rjaegers 8f82719
ci: fix duplicate artifact
rjaegers 4eff8f7
Update ci.yml
rjaegers e9ff8ff
ci: different fix for multiple artifacts
rjaegers 963df19
Merge commit '07dcd6647b97d99fafbe3fa71b902b5bd902222b' into feature/…
rjaegers 8358a7f
ci: update all automation to cope with multiple containers
rjaegers 046e847
chore: move update-apt-packages to own action
rjaegers a8a988e
chore: add flip-link package
rjaegers 70053ce
Merge branch 'main' into feature/add-rust-container-flavor
rjaegers 0cf302e
Merge commit '80383bdc90f68dc545d2923cbbdb33af4ec9be5c' into feature/…
rjaegers e028650
chore: process review comments
rjaegers b505db7
chore: merge the -vscode image into the main image
rjaegers 60314f1
Update build-push.yml
rjaegers 7a48e06
Merge commit '111f15a671d35ed3ccbfc57d7312a2a7885aae32' into feature/…
rjaegers dead322
chore: minor fix after merge
rjaegers 5d83980
chore: move Rust container to Ubuntu 24.04
rjaegers 2d31f95
chore: update Rust to latest version
rjaegers a8c6417
chore: update Docker cli from 25.0.3 to 26.1.1
rjaegers 74d209b
chore: add more test for Rust container
rjaegers de80096
chore: reduce duplication in test code
rjaegers 269b613
chore: add test for coverage
rjaegers 62add84
chore: remove unused bats tags
rjaegers 8501790
chore: don't use run in bats tests when not needed
rjaegers a5dd48c
chore: add mutation testing support to Rust container
rjaegers 6011a60
chore: correct test name to beter reflect its actual scope
rjaegers 4c44ac0
docs: update documentation
rjaegers e7e6d74
Merge commit '5804c2b607a69b190cfadc7136a25b31fa4aaab2' into feature/…
rjaegers 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 hidden or 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 4 additions & 1 deletion
5
.devcontainer/devcontainer.json → .devcontainer/cpp/devcontainer.json
This file contains hidden or 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| FROM ubuntu:22.04@sha256:77906da86b60585ce12215807090eb327e7386c8fafb5402369e421f44eff17e | ||
|
rjaegers marked this conversation as resolved.
Outdated
|
||
|
|
||
| ARG BATS_VERSION=1.10.0 | ||
| ARG RUST_VERSION=1.76.0 | ||
|
|
||
| ARG DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| HEALTHCHECK NONE | ||
|
|
||
| SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
|
|
||
| # Install the base system with all tool dependencies | ||
| COPY .devcontainer/rust/apt-requirements-base.json /tmp/apt-requirements-base.json | ||
| # hadolint ignore=DL3008 | ||
| RUN apt-get update && apt-get install -y --no-install-recommends jq \ | ||
| && jq -r 'to_entries | .[] | .key + "=" + .value' /tmp/apt-requirements-base.json | xargs apt-get install -y --no-install-recommends \ | ||
| && rm /tmp/apt-requirements-base.json \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Include the Cisco Umbrella PKI Root | ||
| RUN wget -qO /usr/local/share/ca-certificates/Cisco_Umbrella_Root_CA.crt https://www.cisco.com/security/pki/certs/ciscoumbrellaroot.pem \ | ||
| && update-ca-certificates | ||
|
|
||
| # Install rust | ||
| RUN wget -qO /tmp/rustup-init "https://static.rust-lang.org/rustup/dist/$(uname -m)-unknown-linux-gnu/rustup-init" \ | ||
| && chmod +x /tmp/rustup-init \ | ||
| && /tmp/rustup-init -qy --default-toolchain=${RUST_VERSION} --component llvm-tools --target thumbv7em-none-eabi \ | ||
| && rm -rf /tmp/rustup-init | ||
|
|
||
| # See https://github.com/moby/moby/issues/28971 why we can't use $HOME here | ||
| ENV PATH="/root/.cargo/bin:$PATH" | ||
|
|
||
| # Install bats | ||
| RUN batstmp="$(mktemp -d /tmp/bats-core-${BATS_VERSION}.XXXX)" \ | ||
| && wget -qO - "https://github.com/bats-core/bats-core/archive/refs/tags/v${BATS_VERSION}.tar.gz" | tar xz -C "${batstmp}" \ | ||
| && bash "${batstmp}/bats-core-${BATS_VERSION}/install.sh" /usr/local \ | ||
| && rm -rf "${batstmp}" \ | ||
| && git -C /usr/local clone -b v0.3.0 https://github.com/bats-core/bats-support.git \ | ||
| && git -C /usr/local clone -b v2.1.0 https://github.com/bats-core/bats-assert.git | ||
|
|
||
| # Update all tool alternatives to the correct version | ||
| RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-12 20 \ | ||
| && update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-12 20 | ||
|
|
||
| # hadolint ignore=DL3008 | ||
| RUN apt-get update \ | ||
|
|
||
| && apt-get install -y --no-install-recommends libudev-dev \ | ||
| && cargo install cargo-binutils \ | ||
| && cargo install probe-rs --features cli \ | ||
| && rm -rf $HOME/.cargo/registry \ | ||
| && apt-get purge -y libudev-dev \ | ||
| && apt-get autoremove -y \ | ||
| && apt-get clean \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "ca-certificates": "20230311ubuntu0.22.04.1", | ||
| "g++-12": "12.3.0-1ubuntu1~22.04", | ||
| "git": "1:2.34.1-1ubuntu1.10", | ||
| "gnupg2": "2.2.27-3ubuntu2.1", | ||
| "pkg-config": "0.29.2-1ubuntu3", | ||
| "wget": "1.21.2-2ubuntu1" | ||
| } |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| [ | ||
| { | ||
| "remoteEnv": { | ||
| "LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}" | ||
| }, | ||
| "customizations": { | ||
| "vscode": { | ||
| "extensions": [ | ||
| "mhutchie.git-graph@1.30.0", | ||
| "ms-vsliveshare.vsliveshare@1.0.5905", | ||
| "rust-lang.rust-analyzer@0.3.1868", | ||
| "tamasfe.even-better-toml@0.19.2", | ||
| "usernamehw.errorlens@3.16.0" | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| ] |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| { | ||
| "build": { | ||
| "dockerfile": "Dockerfile", | ||
| "context": "../.." | ||
| }, | ||
| "privileged": true, | ||
| "remoteEnv": { | ||
| "CONTAINER_FLAVOR": "rust" | ||
| }, | ||
| "mounts": [ | ||
| "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" | ||
| ], | ||
| "customizations": { | ||
| "vscode": { | ||
| "extensions": [ | ||
| "tamasfe.even-better-toml@0.19.2", | ||
| "GitHub.vscode-github-actions@0.26.2", | ||
| "GitHub.vscode-pull-request-github@0.76.1", | ||
| "jetmartin.bats@0.1.10", | ||
| "mhutchie.git-graph@1.30.0", | ||
| "rust-lang.rust-analyzer@0.3.1868", | ||
| "usernamehw.errorlens@3.16.0" | ||
| ] | ||
| } | ||
| } | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| [package] | ||
| name = "hello-cargo" | ||
| version = "0.1.0" | ||
| edition = "2021" | ||
|
|
||
| # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
|
||
| [dependencies] |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| fn main() { | ||
| println!("Hello, world!"); | ||
| } |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| [build] | ||
| target = "thumbv7em-none-eabi" |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.