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 23, 2023
1 parent e66abe1 commit 9967415
Show file tree
Hide file tree
Showing 30 changed files with 270 additions and 567 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:963c4d4b0e029725153814fc88528597fc66dac652758849db3b83fafa227786",
"extensions": [
"13xforever.language-x86-64-assembly",
"bazelbuild.vscode-bazel",
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build_rust_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ jobs:

# Generate docs from within the Docker image.
- name: Generate docs
run: ./scripts/docker_run ./scripts/build_gh_pages ./out
run: |
./scripts/docker_run nix develop --command ./scripts/build_gh_pages ./out
# From the "out" folder, commit the results and push to the `gh-pages` branch.
# This step only applies to `push` events (not `pull_request`), and only if there are actual
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
7 changes: 0 additions & 7 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ MD010:
# https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md013
MD013: false

# Fenced code blocks should be surrounded by blank lines
#
# This does not work well with embedmd, which requires comments around fenced code blocks.
#
# https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md031
MD031: false

# Inline HTML
#
# https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md033
Expand Down
Loading

0 comments on commit 9967415

Please sign in to comment.