Skip to content

Commit

Permalink
Enable act tool for running CI jobs locally (#9648)
Browse files Browse the repository at this point in the history
* Enable to use act tool to run CI jobs locally

Upload GH action requires a server to store objects, this a well-known
limitation for the usage of act tool. This change makes disable the
Upload GH action when act tool is performing locally.

Signed-off-by: Victor Morales <[email protected]>

* Upgrades upload-artifact GH action to v2

This change upgrades some GH actions that were using an older version
of upload-artifact GH action.

Signed-off-by: Victor Morales <[email protected]>

* Disable action-cond during act execution

This change adds a condition to disable the haya14busa/action-cond
action of nrfconnect job during the execution of act tool.

Signed-off-by: Victor Morales <[email protected]>
  • Loading branch information
electrocucaracha authored Sep 16, 2021
1 parent b4d7eb3 commit 89d5353
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
run: scripts/build/gn_bootstrap.sh
- name: Uploading bootstrap logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
if: ${{ always() }} && ${{ !env.ACT }}
with:
name: bootstrap-logs
path: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: scripts/build/gn_bootstrap.sh
- name: Uploading bootstrap logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
if: ${{ always() }} && ${{ !env.ACT }}
with:
name: bootstrap-logs
path: |
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
run: scripts/build/gn_bootstrap.sh
- name: Uploading bootstrap logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
if: ${{ always() }} && ${{ !env.ACT }}
with:
name: bootstrap-logs
path: |
Expand Down Expand Up @@ -270,7 +270,7 @@ jobs:
run: scripts/build/gn_bootstrap.sh
- name: Uploading bootstrap logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
if: ${{ always() }} && ${{ !env.ACT }}
with:
name: bootstrap-logs
path: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cirque.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ jobs:
--volume /dev/pts:/dev/pts \
-- scripts/tests/cirque_tests.sh run_all_tests
- name: Uploading Binaries
uses: actions/upload-artifact@v1
if: ${{ always() }}
uses: actions/upload-artifact@v2
if: ${{ always() }} && ${{ !env.ACT }}
with:
name:
cirque_log-${{steps.outsuffix.outputs.value}}-logs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
run: scripts/build/gn_bootstrap.sh
- name: Uploading bootstrap logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
if: ${{ always() }} && ${{ !env.ACT }}
with:
name: bootstrap-logs
path: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
run: scripts/build/gn_bootstrap.sh
- name: Uploading bootstrap logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
if: ${{ always() }} && ${{ !env.ACT }}
with:
name: bootstrap-logs
path: |
Expand Down Expand Up @@ -92,6 +92,7 @@ jobs:
if_false: "pull-${{ github.event.pull_request.number }}"
- name: Uploading Binaries
uses: actions/upload-artifact@v2
if: ${{ !env.ACT }}
with:
name:
${{ env.BUILD_TYPE }}-example-build-${{
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/examples-esp32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
run: scripts/build/gn_bootstrap.sh
- name: Uploading bootstrap logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
if: ${{ always() }} && ${{ !env.ACT }}
with:
name: bootstrap-logs
path: |
Expand Down Expand Up @@ -115,7 +115,8 @@ jobs:
run: |
cp -r example_binaries/$BUILD_TYPE-build /tmp/output_binaries/
- name: Uploading Binaries
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v2
if: ${{ !env.ACT }}
with:
name:
${{ env.BUILD_TYPE }}-example-build-${{
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-infineon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
run: scripts/build/gn_bootstrap.sh
- name: Uploading bootstrap logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
if: ${{ always() }} && ${{ !env.ACT }}
with:
name: bootstrap-logs
path: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/examples-k32w.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
run: scripts/build/gn_bootstrap.sh
- name: Uploading bootstrap logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
if: ${{ always() }} && ${{ !env.ACT }}
with:
name: bootstrap-logs
path: |
Expand Down Expand Up @@ -90,6 +90,7 @@ jobs:
if_false: "pull-${{ github.event.pull_request.number }}"
- name: Uploading Binaries
uses: actions/upload-artifact@v2
if: ${{ !env.ACT }}
with:
name:
${{ env.BUILD_TYPE }}-example-build-${{
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/examples-linux-standalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
run: scripts/build/gn_bootstrap.sh
- name: Uploading bootstrap logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
if: ${{ always() }} && ${{ !env.ACT }}
with:
name: bootstrap-logs
path: |
Expand Down Expand Up @@ -125,6 +125,7 @@ jobs:
if_false: "pull-${{ github.event.pull_request.number }}"
- name: Uploading Binaries
uses: actions/upload-artifact@v2
if: ${{ !env.ACT }}
with:
name:
${{ env.BUILD_TYPE }}-example-build-${{
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/examples-mbed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:

- name: Uploading bootstrap logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
if: ${{ always() }} && ${{ !env.ACT }}
with:
name: bootstrap-logs
path: |
Expand Down Expand Up @@ -99,7 +99,8 @@ jobs:
if_false: "pull-${{ github.event.pull_request.number }}"

- name: Uploading binaries as artifacts
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v2
if: ${{ !env.ACT }}
with:
name:
${{ env.BUILD_TYPE }}-binaries-${{env.APP_TARGET}}-${{ env.APP_PROFILE}}-build-${{
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/examples-nrfconnect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
run: scripts/build/gn_bootstrap.sh
- name: Uploading bootstrap logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
if: ${{ always() }} && ${{ !env.ACT }}
with:
name: bootstrap-logs
path: |
Expand Down Expand Up @@ -155,12 +155,14 @@ jobs:
- name: Binary artifact suffix
id: outsuffix
uses: haya14busa/[email protected]
if: ${{ !env.ACT }}
with:
cond: ${{ github.event.pull_request.number == '' }}
if_true: "${{ github.sha }}"
if_false: "pull-${{ github.event.pull_request.number }}"
- name: Uploading Binaries
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v2
if: ${{ !env.ACT }}
with:
name:
${{ env.BUILD_TYPE }}-example-build-${{
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/examples-qpg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
run: scripts/build/gn_bootstrap.sh
- name: Uploading bootstrap logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
if: ${{ always() }} && ${{ !env.ACT }}
with:
name: bootstrap-logs
path: |
Expand Down Expand Up @@ -91,6 +91,7 @@ jobs:
if_false: "pull-${{ github.event.pull_request.number }}"
- name: Uploading Binaries
uses: actions/upload-artifact@v2
if: ${{ !env.ACT }}
with:
name:
${{ env.BUILD_TYPE }}-example-build-${{
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/qemu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
run: scripts/build/gn_bootstrap.sh
- name: Uploading bootstrap logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
if: ${{ always() }} && ${{ !env.ACT }}
with:
name: bootstrap-logs
path: |
Expand All @@ -61,7 +61,8 @@ jobs:
timeout-minutes: 35
run: scripts/tests/esp32_qemu_tests.sh /tmp/test_logs
- name: Uploading Logs
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v2
if: ${{ !env.ACT }}
with:
name: qemu-esp32-logs
path: /tmp/log_output
4 changes: 2 additions & 2 deletions .github/workflows/release_artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
run: scripts/build/gn_bootstrap.sh
- name: Uploading bootstrap logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
if: ${{ always() }} && ${{ !env.ACT }}
with:
name: bootstrap-logs
path: |
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
run: scripts/build/gn_bootstrap.sh
- name: Uploading bootstrap logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
if: ${{ always() }} && ${{ !env.ACT }}
with:
name: bootstrap-logs
path: |
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
run: scripts/build/gn_bootstrap.sh
- name: Uploading bootstrap logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
if: ${{ always() }} && ${{ !env.ACT }}
with:
name: bootstrap-logs-linux-${{ matrix.type }}-${{ matrix.eventloop }}
path: |
Expand Down Expand Up @@ -94,15 +94,15 @@ jobs:
scripts/tests/test_suites.sh -a tv
- name: Uploading core files
uses: actions/upload-artifact@v2
if: ${{ failure() }}
if: ${{ failure() }} && ${{ !env.ACT }}
with:
name: crash-core-linux-${{ matrix.type }}-${{ matrix.eventloop }}
path: /tmp/cores/
# Cores are big; don't hold on to them too long.
retention-days: 5
- name: Uploading objdir for debugging
uses: actions/upload-artifact@v2
if: ${{ failure() }}
if: ${{ failure() }} && ${{ !env.ACT }}
with:
name: crash-objdir-linux-${{ matrix.type }}-${{ matrix.eventloop }}
path: objdir-clone/
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
run: scripts/build/gn_bootstrap.sh
- name: Uploading bootstrap logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
if: ${{ always() }} && ${{ !env.ACT }}
with:
name: bootstrap-logs-darwin-${{ matrix.type }}-${{ matrix.eventloop }}
path: |
Expand All @@ -175,21 +175,21 @@ jobs:
scripts/tests/test_suites.sh
- name: Uploading core files
uses: actions/upload-artifact@v2
if: ${{ failure() }}
if: ${{ failure() }} && ${{ !env.ACT }}
with:
name: crash-core-darwin-${{ matrix.type }}-${{ matrix.eventloop }}
path: /cores/
# Cores are big; don't hold on to them too long.
retention-days: 5
- name: Uploading diagnostic logs
uses: actions/upload-artifact@v2
if: ${{ failure() }}
if: ${{ failure() }} && ${{ !env.ACT }}
with:
name: crash-log-darwin-${{ matrix.type }}-${{ matrix.eventloop }}
path: ~/Library/Logs/DiagnosticReports/
- name: Uploading objdir for debugging
uses: actions/upload-artifact@v2
if: ${{ failure() }}
if: ${{ failure() }} && ${{ !env.ACT }}
with:
name: crash-objdir-darwin-${{ matrix.type }}-${{ matrix.eventloop }}
path: objdir-clone/
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/unit_integration_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
scripts/build/gn_bootstrap.sh ;
- name: Uploading bootstrap logs
uses: actions/upload-artifact@v2
if: ${{ always() }}
if: ${{ always() }} && ${{ !env.ACT }}
with:
name: bootstrap-logs
path: |
Expand Down Expand Up @@ -90,8 +90,8 @@ jobs:
timeout-minutes: 5
run: RUN_HAPPY_TESTS=1 scripts/tests/gn_tests.sh
- name: Uploading Happy Test Log
uses: actions/upload-artifact@v1
if: ${{ always() }}
uses: actions/upload-artifact@v2
if: ${{ always() }} && ${{ !env.ACT }}
with:
name:
happy_log-${{ steps.outsuffix.outputs.value }}-${{ matrix.type }}
Expand Down

0 comments on commit 89d5353

Please sign in to comment.