Skip to content

Commit 8e5e494

Browse files
andy31415Copilotandreilitvin
authored
[CI] Split linux REPL tests into "build" and "run" (project-chip#41960)
* Test cross-workflow sharing of REPL build logic. * Update logic: fix typo in artifact name. * Switch run test instance to namespace.so * Fix up the paths that are being uploaded. * Artifacts do not need a unique name: they are for sharing across jobs in the same workflow. * Fix profile name * Add temporary debug capability. * Add andy31415 as an authorized user for breakpoints. * Try to fix up artifacts: smaller and proper permissions. * Fix the strip path * Update/fix strip command. * Clean up tar creation (less verbose). Things seem to work now MUCH better. * Avoid extra work for jupyter notebooks. * Fix jupyter folder path. * Make TSAN suppression file absolute * use GITHUB_WORKSPACE since github.workspace seems to potentially point to other places. * use GITHUB_WORKSPACE since that is what works in containers according to .github/workflows/java-tests.yaml * remove objdir-clone logic generally * Try to fix up TSAN and CCACHE options * Remove a tsan option that will be overriden * Fixes * Fix path for suppressions again (trailing quote) * Update .github/workflows/tests.yaml Co-authored-by: Copilot <[email protected]> * Try to fix ASR running out of space. * Update .github/workflows/tests.yaml Co-authored-by: Copilot <[email protected]> * Fix title typo * Try to avoid "artifact already exists" error. * Speed up archiving, add some debug option for run (figure out why we fail on suppression file) * Look to undo the suppression path error. * Remove breakpoint --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Andrei Litvin <[email protected]>
1 parent 749558f commit 8e5e494

File tree

5 files changed

+135
-110
lines changed

5 files changed

+135
-110
lines changed

.github/actions/bootstrap/action.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ runs:
9090

9191
- name: Save bootstrap cache
9292
uses: ./.github/actions/dynamic
93-
# Don't save cache if the build is a pull request, to prevent creation of multiple pr-ref caches with the same key.
93+
# Don't save cache if the build is a pull request, to prevent creation of multiple pr-ref caches with the same key.
9494
# PR builds still will be able to restore from cache created by master build.
9595
if: ${{ fromJSON(steps.restore.outputs.outputs).cache-hit != 'true' && github.event_name != 'pull_request' }}
9696
continue-on-error: true
@@ -107,6 +107,7 @@ runs:
107107
if: ${{ always() && !env.ACT && fromJSON(steps.restore.outputs.outputs).cache-hit != 'true' }}
108108
with:
109109
name: ${{ inputs.bootstrap-log-name }}
110+
overwrite: true # may as well, avoid errors of "artifact already exists"
110111
path: |
111112
.environment/gn_out/.ninja_log
112113
.environment/pigweed-venv/*.log

.github/actions/setup-ccache/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ runs:
2828
main: |
2929
mkdir -p .ccache
3030
echo "CCACHE_NOHASHDIR=1" >> $GITHUB_ENV
31-
echo "CCACHE_BASEDIR=${{ github.workspace }}" >> $GITHUB_ENV
31+
echo "CCACHE_BASEDIR=${GITHUB_WORKSPACE}" >> $GITHUB_ENV
3232
echo "CCACHE_NODIRECT=1" >> $GITHUB_ENV
33-
echo "CCACHE_PREFIX_CPP=${{ github.workspace }}/scripts/helpers/ccache-prefix-cpp.sh" >> $GITHUB_ENV
33+
echo "CCACHE_PREFIX_CPP=${GITHUB_WORKSPACE}/scripts/helpers/ccache-prefix-cpp.sh" >> $GITHUB_ENV
3434
echo "CCACHE_SLOPPINESS=time_macros" >> $GITHUB_ENV
35-
echo "CCACHE_DIR=${{ github.workspace }}/.ccache" >> $GITHUB_ENV
35+
echo "CCACHE_DIR=${GITHUB_WORKSPACE}/.ccache" >> $GITHUB_ENV
3636
echo "CCACHE_COMPILERCHECK=content" >> $GITHUB_ENV
3737
echo "CCACHE_MAXSIZE=5G" >> $GITHUB_ENV
3838
echo "CCACHE_COMPRESS=1" >> $GITHUB_ENV

.github/workflows/examples-asr.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
uses: ./.github/actions/checkout-submodules-and-bootstrap
4848
with:
4949
platform: asr
50-
- name: Build all ASR582X examples
50+
- name: Build all ASR582X examples (part1)
5151
run: |
5252
./scripts/run_in_build_env.sh \
5353
"./scripts/build/build_examples.py \
@@ -57,6 +57,14 @@ jobs:
5757
--target asr-asr582x-light-switch-shell \
5858
--target asr-asr582x-lock-no_logging \
5959
--target asr-asr582x-ota-requestor \
60+
build \
61+
"
62+
- name: Clean out directory (make some room for more compiles)
63+
run: rm -rf out/
64+
- name: Build all ASR582X examples (part2)
65+
run: |
66+
./scripts/run_in_build_env.sh \
67+
"./scripts/build/build_examples.py \
6068
--target asr-asr582x-bridge-factory \
6169
--target asr-asr582x-temperature-measurement-rotating_id \
6270
--target asr-asr582x-thermostat-rio \

.github/workflows/java-tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ jobs:
3737
name: Linux
3838

3939
env:
40-
PW_PROJECT_ROOT: ${{ github.workspace }}
41-
TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt"
40+
PW_PROJECT_ROOT: ${GITHUB_WORKSPACE}
41+
TSAN_OPTIONS: "halt_on_error=1 suppressions=${GITHUB_WORKSPACE}/scripts/tests/chiptest/tsan-linux-suppressions.txt"
4242

4343
if: github.actor != 'restyled-io[bot]'
4444
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)