-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reuse devcontainer image in github actions
This is needed to run benchmarking tests in CI using the same `valgrind` binaries we install in the devcontainer. Also moved the cache steps to a common action to avoid duplication.
- Loading branch information
1 parent
54c9067
commit 3a923c1
Showing
15 changed files
with
344 additions
and
354 deletions.
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: "cache/restore" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: "Restore Cache" | ||
uses: "actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9" | ||
with: | ||
# __SLANG_CI_CACHE_PATHS__ (keep in sync) | ||
key: "cache-${{ github.ref_name }}-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('package-lock.json') }}" | ||
path: | | ||
~/.cache/hermit/ | ||
~/.local/share/virtualenvs/ | ||
.hermit/ | ||
restore-keys: | | ||
cache-${{ github.ref_name }}- | ||
cache-main- | ||
cache- |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: "cache/save" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: "Repossess files from devcontainer user" | ||
shell: "bash" | ||
run: "sudo chown -R $USER:$USER $GITHUB_WORKSPACE" | ||
|
||
- name: "Save Cache" | ||
uses: "actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9" | ||
with: | ||
# __SLANG_CI_CACHE_PATHS__ (keep in sync) | ||
key: "cache-${{ github.ref_name }}-${{ hashFiles('Cargo.lock') }}-${{ hashFiles('package-lock.json') }}" | ||
path: | | ||
~/.cache/hermit/ | ||
~/.local/share/virtualenvs/ | ||
.hermit/ |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: "devcontainer/run" | ||
|
||
inputs: | ||
runCmd: | ||
type: "string" | ||
required: true | ||
|
||
# TODO: this is a workaround for https://github.com/devcontainers/ci/pull/295 | ||
# Will remove and replace with 'inheritEnv' once the fix is released | ||
env: | ||
type: "string" | ||
default: "" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: "Run in devcontainer" | ||
uses: "devcontainers/ci@a56d055efecd725e8cfe370543b6071b79989cc8" | ||
with: | ||
configFile: ".devcontainer/devcontainer.json" | ||
env: | | ||
CI | ||
${{ inputs.env }} | ||
push: "never" | ||
runCmd: "${{ inputs.runCmd }}" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.