Skip to content

Commit

Permalink
Use nix in Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
tiziano88 committed Jun 22, 2023
1 parent b07e02a commit 48f0933
Show file tree
Hide file tree
Showing 24 changed files with 226 additions and 532 deletions.
2 changes: 1 addition & 1 deletion .devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// - https://code.visualstudio.com/docs/remote/devcontainerjson-reference
{
// Do not modify manually. This value is automatically updated by ./scripts/docker_build .
"image": "sha256:f48ec237afe33447dadb24071ef38a5bd472a2fcae2c1ef61bab0244ee9c0e03",
"image": "sha256:e9b1e57b1b7f8f5fdbc04c668af566f7f41837ff6466d6e636c57321bbf7f5e2",
"extensions": [
"13xforever.language-x86-64-assembly",
"bazelbuild.vscode-bazel",
Expand Down
31 changes: 1 addition & 30 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,43 +74,14 @@ jobs:
./scripts/docker_pull
df --human-readable
# Store various common Rust folders to speed up future runs.
#
# The main cache key includes the combined hash of all Cargo.lock files in the repository, but
# falls back on a more generic prefix if an exact match is not found, so that there is at
# least some chance that some of the artifacts will be found there.
#
# We specify the `./cargo-cache` folder (as per `/scripts/docker_run`), as well as various
# `target` folders. This can probably be improved in a variety of ways over time.
#
# See https://doc.rust-lang.org/nightly/cargo/guide/cargo-home.html#caching-the-cargo-home-in-ci
- name: Cache Rust artifacts
uses: actions/cache@v3
env:
# Increment this value to invalidate previous cache entries.
CACHE_VERSION: 15
with:
path: |
./cargo-cache/bin
./cargo-cache/registry/index
./cargo-cache/registry/cache
./cargo-cache/git/db
./sccache-cache
./target
key: |
cargo-cache-${{ env.CACHE_VERSION }}-${{ matrix.cmd }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-cache-${{ env.CACHE_VERSION }}-${{ matrix.cmd }}-
cargo-cache-${{ env.CACHE_VERSION }}-
- name: Run command
env:
RUST_BACKTRACE: 1
RUST_LOG: debug
# Do not run tests that require KVM on GitHub Actions, since nested virtualization is not supported.
OAK_KVM_TESTS: skip
run: |
./scripts/docker_run ./scripts/xtask --scope=all ${{ matrix.cmd }}
./scripts/docker_run nix develop --command ./scripts/xtask --scope=all ${{ matrix.cmd }}
df --human-readable
# Ensure that the previous steps did not modify our source-code and that
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 48f0933

Please sign in to comment.