Skip to content

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2073
-2006
lines changed

.cirrus.yml

Lines changed: 0 additions & 462 deletions
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "Install Valgrind"
2+
description: "Install Homebrew's Valgrind package and cache it."
3+
runs:
4+
using: "composite"
5+
steps:
6+
- run: |
7+
brew tap LouisBrunner/valgrind
8+
brew fetch --HEAD LouisBrunner/valgrind/valgrind
9+
echo "CI_HOMEBREW_CELLAR_VALGRIND=$(brew --cellar valgrind)" >> "$GITHUB_ENV"
10+
shell: bash
11+
12+
- run: |
13+
sw_vers > valgrind_fingerprint
14+
brew --version >> valgrind_fingerprint
15+
git -C "$(brew --cache)/valgrind--git" rev-parse HEAD >> valgrind_fingerprint
16+
cat valgrind_fingerprint
17+
shell: bash
18+
19+
- uses: actions/cache@v3
20+
id: cache
21+
with:
22+
path: ${{ env.CI_HOMEBREW_CELLAR_VALGRIND }}
23+
key: ${{ github.job }}-valgrind-${{ hashFiles('valgrind_fingerprint') }}
24+
25+
- if: steps.cache.outputs.cache-hit != 'true'
26+
run: |
27+
brew install --HEAD LouisBrunner/valgrind/valgrind
28+
shell: bash
29+
30+
- if: steps.cache.outputs.cache-hit == 'true'
31+
run: |
32+
brew link valgrind
33+
shell: bash
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: 'Run in Docker with environment'
2+
description: 'Run a command in a Docker container, while passing explicitly set environment variables into the container.'
3+
inputs:
4+
dockerfile:
5+
description: 'A Dockerfile that defines an image'
6+
required: true
7+
tag:
8+
description: 'A tag of an image'
9+
required: true
10+
command:
11+
description: 'A command to run in a container'
12+
required: false
13+
default: ./ci/ci.sh
14+
runs:
15+
using: "composite"
16+
steps:
17+
- uses: docker/setup-buildx-action@v3
18+
19+
- uses: docker/build-push-action@v5
20+
id: main_builder
21+
continue-on-error: true
22+
with:
23+
context: .
24+
file: ${{ inputs.dockerfile }}
25+
tags: ${{ inputs.tag }}
26+
load: true
27+
cache-from: type=gha
28+
29+
- uses: docker/build-push-action@v5
30+
id: retry_builder
31+
if: steps.main_builder.outcome == 'failure'
32+
with:
33+
context: .
34+
file: ${{ inputs.dockerfile }}
35+
tags: ${{ inputs.tag }}
36+
load: true
37+
cache-from: type=gha
38+
39+
- # Tell Docker to pass environment variables in `env` into the container.
40+
run: >
41+
docker run \
42+
$(echo '${{ toJSON(env) }}' | jq -r 'keys[] | "--env \(.) "') \
43+
--volume ${{ github.workspace }}:${{ github.workspace }} \
44+
--workdir ${{ github.workspace }} \
45+
${{ inputs.tag }} bash -c "
46+
git config --global --add safe.directory ${{ github.workspace }}
47+
${{ inputs.command }}
48+
"
49+
shell: bash

0 commit comments

Comments
 (0)