Skip to content

Commit

Permalink
GitHub: unpack tests-dut artifact
Browse files Browse the repository at this point in the history
unpack artifact

Signed-off-by: Robert Gałat <[email protected]>
  • Loading branch information
RobertGalatNordic committed Aug 1, 2023
1 parent 18b9a47 commit 8b965b6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 40 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/common-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,18 @@ jobs:
ln -s internal_sidewalk sidewalk
- name: Build test artifacts for
run: /workdir/zephyr/scripts/twister --platform ${{ matrix.platform }} --testsuite-root /workdir/sidewalk/tests/functional --testsuite-root /workdir/sidewalk/tests/unit_tests --testsuite-root /workdir/sidewalk/tests/validation --inline-logs --overflow-as-errors -vvv --prep-artifacts-for-testing --package-artifacts PACKAGE_ARTIFACTS_${{ matrix.platform }}_${{ matrix.subset }} --subset ${{ matrix.subset }}/${{ env.MAX_SUBSETS }}
run: |
/workdir/zephyr/scripts/twister --platform ${{ matrix.platform }} --testsuite-root /workdir/sidewalk/tests/functional --testsuite-root /workdir/sidewalk/tests/unit_tests --testsuite-root /workdir/sidewalk/tests/validation --inline-logs --overflow-as-errors -vvv --prep-artifacts-for-testing --package-artifacts PACKAGE_ARTIFACTS_${{ matrix.platform }}_${{ matrix.subset }}.tar.bz2 --subset ${{ matrix.subset }}/${{ env.MAX_SUBSETS }}
rm -rf twister-out
tar -xf PACKAGE_ARTIFACTS_${{ matrix.platform }}_${{ matrix.subset }}.tar.bz2
- name: Upload build artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: tests-dut-${{ matrix.platform }}-${{ matrix.subset }}_of_${{ env.MAX_SUBSETS }}
path: |
PACKAGE_ARTIFACTS_${{ matrix.platform }}_${{ matrix.subset }}
twister-out
combine_artifacts:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -322,11 +325,17 @@ jobs:
- name: Combine tests-dut
shell: bash
run: |
mkdir package_artifacts
mkdir twister-out
shopt -s extglob
cp -r artifacts/tests-dut-*/* package_artifacts/
tar -czvf tests-dut_artifacts.tar.gz package_artifacts
rm -rf package_artifacts
cp -r artifacts/tests-dut-*/!(*.json) twister-out/
echo -n "/workdir/zephyr/scripts/twister --dry-run --no-clean --testsuite-root /workdir/sidewalk/tests/functional --testsuite-root /workdir/sidewalk/tests/unit_tests --testsuite-root /workdir/sidewalk/tests/validation" > twister_command.sh
cat platforms | while read platform_var; do echo -n " --platform $platform_var" >> twister_command.sh; done
echo "" >> twister_commands.sh
chmod +x twister_command.sh
./twister_command.sh
tar -czvf tests-dut_artifacts.tar.gz twister-out
rm -rf twister-out twister_command.sh
- uses: geekyeggo/delete-artifact@v2
with:
Expand Down
42 changes: 9 additions & 33 deletions .github/workflows/tag-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,48 +39,24 @@ jobs:
- name: Check Tag
id: check-tag
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+.[0-9]+.[0-9]$ ]]; then
if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+.[0-9]+.[0-9]+$ ]]; then
echo "prerelease=false" >> $GITHUB_OUTPUT
else
echo "prerelease=true" >> $GITHUB_OUTPUT
fi
- name: Upload documentation to release page
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/documentation.zip
asset_name: documentation.zip
tag: ${{ github.ref }}
overwrite: true
prerelease: ${{ steps.check-tag.outputs.prerelease }}

- name: Upload build binaries to release page
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/sample-artifacts
asset_name: sample-artifacts.tar.gz
tag: ${{ github.ref }}
overwrite: true
prerelease: ${{ steps.check-tag.outputs.prerelease }}

- name: Upload test-dut binaries to release page
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/tests-dut-artifacts
asset_name: tests-dut-artifacts.tar.gz
tag: ${{ github.ref }}
overwrite: true
prerelease: ${{ steps.check-tag.outputs.prerelease }}
- name: prepare artifacts
run: |
cd artifacts;
shopt -s extglob
for f in !(*.zip) ; do zip -r $f.zip $f; done
- name: Upload test-dut binaries to release page
- name: Upload artifacts to release page
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/tests-manual-artifacts
asset_name: tests-manual-artifacts.tar.gz
tag: ${{ github.ref }}
file: artifacts/*.zip
file_glob: true
overwrite: true
prerelease: ${{ steps.check-tag.outputs.prerelease }}
1 change: 0 additions & 1 deletion doc/build_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -e
python3 -m venv venv
source ./venv/bin/activate

pip install wheel
pip install -r $(pwd)/requirements-doc.txt

sphinx-build -M html . build

0 comments on commit 8b965b6

Please sign in to comment.