Skip to content

Commit dc4a486

Browse files
GHA: add test_config and update GHA
prepare gitHub automation for unit test refactoring Signed-off-by: Robert Gałat <[email protected]>
1 parent 9d16395 commit dc4a486

File tree

52 files changed

+212
-164
lines changed

Some content is hidden

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

52 files changed

+212
-164
lines changed

.github/workflows/compare_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
diff_detected: ${{steps.config_diff.outputs.diff}}
2323
artifact_url: ${{steps.save_diff.outputs.artifact-url}}
2424

25-
runs-on: ubuntu-latest
25+
runs-on: ubuntu-24.04
2626
steps:
2727

2828
- name: Get artifacts from current

.github/workflows/on-commit.yml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
get_base_commit:
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-24.04
1515
outputs:
1616
commit_number: ${{ steps.get_commits.outputs.commit_number }}
1717
steps:
@@ -33,16 +33,42 @@ jobs:
3333
with:
3434
reference_commit: "HEAD~${{needs.get_base_commit.outputs.commit_number}}"
3535

36+
discover_target_boards:
37+
runs-on: ubuntu-24.04
38+
outputs:
39+
targets: ${{ steps.platforms.outputs.targets }}
40+
steps:
41+
- name: install yq
42+
run: pip install yq
43+
44+
- name: Checkout
45+
uses: actions/checkout@v4
46+
with:
47+
path: sidewalk
48+
49+
- name: get_platforms
50+
id: platforms
51+
run: |
52+
result=$(yq '.common.platform_allow' sidewalk/samples/sid_end_device/sample.yaml -c)
53+
echo "targets=$result" >> $GITHUB_OUTPUT;
54+
echo "$result"
55+
3656
build_samples:
57+
needs: [discover_target_boards]
3758
uses: ./.github/workflows/samples_build.yml
59+
with:
60+
boards_to_test: ${{needs.discover_target_boards.outputs.targets}}
3861

3962
build_and_run_tests:
63+
needs: [discover_target_boards]
4064
uses: ./.github/workflows/run_tests.yml
65+
with:
66+
boards_to_test: ${{needs.discover_target_boards.outputs.targets}}
4167

4268
Post_fail_to_Teams:
4369
needs: [verify_changes, build_samples, build_and_run_tests]
4470
if: ${{ failure() }}
45-
runs-on: ubuntu-latest
71+
runs-on: ubuntu-24.04
4672
steps:
4773
- uses: neonidian/teams-notify-build-status@v4
4874
with:
@@ -62,7 +88,7 @@ jobs:
6288

6389
post_configuration_diff:
6490
needs: [compare_configuration]
65-
runs-on: ubuntu-latest
91+
runs-on: ubuntu-24.04
6692
if: ${{ fromJson(needs.compare_configuration.outputs.diff_detected)}}
6793
steps:
6894
- uses: actions/download-artifact@v4

.github/workflows/on-pr.yml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44

55
jobs:
66
Run_Configuration:
7-
runs-on: ubuntu-latest
7+
runs-on: ubuntu-24.04
88
outputs:
99
NRF_revision: ${{ steps.config.outputs.NRF_revision }}
1010
steps:
@@ -47,7 +47,7 @@ jobs:
4747
reference_commit: ${{ github.event.pull_request.base.sha }}
4848

4949
save_pr_number:
50-
runs-on: ubuntu-latest
50+
runs-on: ubuntu-24.04
5151
steps:
5252
- name: Save PR number to file
5353
run: |
@@ -60,14 +60,36 @@ jobs:
6060
path: |
6161
PR_number
6262
63+
discover_target_boards:
64+
runs-on: ubuntu-24.04
65+
outputs:
66+
targets: ${{ steps.platforms.outputs.targets }}
67+
steps:
68+
- name: install yq
69+
run: pip install yq
70+
71+
- name: Checkout
72+
uses: actions/checkout@v4
73+
with:
74+
path: sidewalk
75+
76+
- name: get_platforms
77+
id: platforms
78+
run: |
79+
result=$(yq '.common.platform_allow' sidewalk/samples/sid_end_device/sample.yaml -c)
80+
echo "targets=$result" >> $GITHUB_OUTPUT;
81+
echo "$result"
82+
6383
build_samples:
64-
needs: Run_Configuration
84+
needs: [Run_Configuration, discover_target_boards]
6585
uses: ./.github/workflows/samples_build.yml
6686
with:
6787
nrf_revision: ${{needs.Run_Configuration.outputs.NRF_revision}}
88+
boards_to_test: ${{needs.discover_target_boards.outputs.targets}}
6889

6990
build_and_run_tests:
70-
needs: Run_Configuration
91+
needs: [Run_Configuration, discover_target_boards]
7192
uses: ./.github/workflows/run_tests.yml
7293
with:
7394
nrf_revision: ${{needs.Run_Configuration.outputs.NRF_revision}}
95+
boards_to_test: ${{needs.discover_target_boards.outputs.targets}}

.github/workflows/on-pr_dnm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
do_not_merge:
99
if: ${{ contains(github.event.*.labels.*.name, 'DNM') }}
1010
name: Prevent Merging
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-24.04
1212
steps:
1313
- name: Check for label
1414
run: |

.github/workflows/on-pr_labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44

55
jobs:
66
triage:
7-
runs-on: ubuntu-latest
7+
runs-on: ubuntu-24.04
88
steps:
99
- uses: actions/labeler@v5
1010
with:

.github/workflows/on-pr_nrf_manifest_update_PR.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
read_pr_configuration:
10-
runs-on: ubuntu-latest
10+
runs-on: ubuntu-24.04
1111
outputs:
1212
Create_NRF_PR: ${{ steps.config.outputs.Create_NRF_PR }}
1313
steps:
@@ -46,7 +46,7 @@ jobs:
4646
fi;
4747
4848
create-manifest-pr:
49-
runs-on: ubuntu-latest
49+
runs-on: ubuntu-24.04
5050
needs: read_pr_configuration
5151
if: ${{ fromJson(needs.read_pr_configuration.outputs.Create_NRF_PR)}}
5252
steps:

.github/workflows/on-pr_publish_comment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
create_PR_comment:
1717
needs: [compare_configuration]
18-
runs-on: ubuntu-latest
18+
runs-on: ubuntu-24.04
1919
permissions:
2020
issues: write
2121
pull-requests: write

.github/workflows/on-push-tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
needs: [build_documentation, build_samples]
2121
permissions: write-all
2222
name: Create release page
23-
runs-on: ubuntu-latest
23+
runs-on: ubuntu-24.04
2424

2525
steps:
2626
- name: Download artifact

.github/workflows/on_docker_change.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ env:
2121

2222
jobs:
2323
build-and-push-image:
24-
runs-on: ubuntu-latest
24+
runs-on: ubuntu-24.04
2525
permissions:
2626
contents: read
2727
packages: write

.github/workflows/publish_documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
env:
3434
ARCHIVE: "sidewalk_${{inputs.documentation_tag}}.zip"
3535

36-
runs-on: ubuntu-latest
36+
runs-on: ubuntu-24.04
3737
container:
3838
image: ghcr.io/nrfconnect/sdk-sidewalk:main
3939
options: --cpus 2

0 commit comments

Comments
 (0)