Deploy GitHub pages at last for multiple jobs
This commit is contained in:
65
.github/workflows/regression_template.yml
vendored
65
.github/workflows/regression_template.yml
vendored
@@ -21,7 +21,15 @@ on:
|
|||||||
default: './test/cmake'
|
default: './test/cmake'
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
deploy_url_affix:
|
skip_test:
|
||||||
|
default: false
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
skip_deploy:
|
||||||
|
default: false
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
deploy_list:
|
||||||
default: ''
|
default: ''
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
@@ -34,6 +42,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
# This workflow contains a single job called "linux_job"
|
# This workflow contains a single job called "linux_job"
|
||||||
run_tests:
|
run_tests:
|
||||||
|
if: ${{ !inputs.skip_test}}
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
issues: read
|
issues: read
|
||||||
@@ -71,10 +80,11 @@ jobs:
|
|||||||
if: success() || failure()
|
if: success() || failure()
|
||||||
uses: actions/upload-artifact@v3.1.3
|
uses: actions/upload-artifact@v3.1.3
|
||||||
with:
|
with:
|
||||||
name: test_reports${{ inputs.deploy_url_affix }}
|
name: test_reports ${{ inputs.result_affix }}
|
||||||
path: |
|
path: |
|
||||||
${{ inputs.cmake_path }}/build/*.txt
|
${{ inputs.cmake_path }}/build/*.txt
|
||||||
${{ inputs.cmake_path }}/build/*/Testing/**/*.xml
|
${{ inputs.cmake_path }}/build/*/Testing/**/*.xml
|
||||||
|
${{ inputs.cmake_path }}/build/**/regression/output_files/*.bin
|
||||||
|
|
||||||
- name: Configure GitHub Pages
|
- name: Configure GitHub Pages
|
||||||
uses: actions/configure-pages@v3.0.6
|
uses: actions/configure-pages@v3.0.6
|
||||||
@@ -113,41 +123,56 @@ jobs:
|
|||||||
|
|
||||||
- name: Prepare GitHub Pages
|
- name: Prepare GitHub Pages
|
||||||
run: >-
|
run: >-
|
||||||
if [ "${{ inputs.deploy_url_affix }}" != "" ]; then
|
if [ "${{ inputs.result_affix }}" != "" ]; then
|
||||||
mv ${{ inputs.cmake_path }}/coverage_report/default_build_coverage \
|
mv ${{ inputs.cmake_path }}/coverage_report/default_build_coverage \
|
||||||
${{ inputs.cmake_path }}/coverage_report/default_build_coverage${{ inputs.deploy_url_affix }}
|
${{ inputs.cmake_path }}/coverage_report/${{ inputs.result_affix }}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# - name: Upload GitHub Pages artifact
|
|
||||||
# uses: actions/upload-pages-artifact@v2.0.0
|
|
||||||
# with:
|
|
||||||
# path: ${{ inputs.cmake_path }}/coverage_report
|
|
||||||
# name: coverage_report${{ inputs.deploy_url_affix }}
|
|
||||||
|
|
||||||
- name: Upload Code Coverage
|
- name: Upload Code Coverage Artifacts
|
||||||
uses: actions/upload-artifact@v3.1.3
|
uses: actions/upload-artifact@v3.1.3
|
||||||
|
if: ${{ inputs.skip_deploy }}
|
||||||
with:
|
with:
|
||||||
name: coverage_report
|
name: github-pages
|
||||||
path: ${{ inputs.cmake_path }}/coverage_report
|
path: ${{ inputs.cmake_path }}/coverage_report
|
||||||
|
|
||||||
|
- name: Upload Code Coverage Pages
|
||||||
|
uses: actions/upload-pages-artifact@v2.0.0
|
||||||
|
if: ${{ !inputs.skip_deploy }}
|
||||||
|
with:
|
||||||
|
path: ${{ inputs.cmake_path }}/coverage_report/default_build_coverage
|
||||||
|
|
||||||
deploy_code_coverage:
|
deploy_code_coverage:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event_name == 'push' && false
|
if: ${{ (github.event_name == 'push') && !inputs.skip_deploy && always() }}
|
||||||
needs: run_tests
|
needs: run_tests
|
||||||
environment:
|
environment:
|
||||||
name: github-pages
|
name: github-pages
|
||||||
url: ${{ steps.deployment.outputs.page_url }}/default_build_coverage${{ inputs.deploy_url_affix }}
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
permissions:
|
permissions:
|
||||||
pages: write
|
pages: write
|
||||||
id-token: write
|
id-token: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: github-pages
|
||||||
|
|
||||||
|
- name: Upload Code Coverage Pages
|
||||||
|
uses: actions/upload-pages-artifact@v2.0.0
|
||||||
|
if: inputs.skip_test
|
||||||
|
with:
|
||||||
|
path: .
|
||||||
|
|
||||||
- name: Deploy GitHub Pages site
|
- name: Deploy GitHub Pages site
|
||||||
id: deployment
|
id: deployment
|
||||||
uses: actions/deploy-pages@v1.2.9
|
uses: actions/deploy-pages@v1.2.9
|
||||||
with:
|
|
||||||
artifact_name: coverage_report${{ inputs.deploy_url_affix }}
|
|
||||||
|
|
||||||
- name: Write Code Coverage Report URL
|
- name: Write Code Coverage Report URL
|
||||||
run: |
|
run: >-
|
||||||
echo '[Open Coverage Report](${{ steps.deployment.outputs.page_url }}/default_build_coverage${{ inputs.deploy_url_affix }})' >> $GITHUB_STEP_SUMMARY
|
if [ "${{ inputs.deploy_list }}" != "" ]; then
|
||||||
|
for i in ${{ inputs.deploy_list }}; do
|
||||||
|
echo 'Coverage report for $i:${{ steps.deployment.outputs.page_url }}/$i' >> $GITHUB_STEP_SUMMARY
|
||||||
|
done
|
||||||
|
else
|
||||||
|
echo 'Coverage report: (${{ steps.deployment.outputs.page_url }}' >> $GITHUB_STEP_SUMMARY
|
||||||
|
fi
|
||||||
15
.github/workflows/regression_test.yml
vendored
15
.github/workflows/regression_test.yml
vendored
@@ -17,13 +17,20 @@ jobs:
|
|||||||
build_script: ./scripts/build_tx.sh
|
build_script: ./scripts/build_tx.sh
|
||||||
test_script: ./scripts/test_tx.sh
|
test_script: ./scripts/test_tx.sh
|
||||||
cmake_path: ./test/tx/cmake
|
cmake_path: ./test/tx/cmake
|
||||||
deploy_url_affix: _tx
|
|
||||||
result_affix: ThreadX
|
result_affix: ThreadX
|
||||||
tx_smp:
|
skip_deploy: true
|
||||||
|
smp:
|
||||||
uses: ./.github/workflows/regression_template.yml
|
uses: ./.github/workflows/regression_template.yml
|
||||||
with:
|
with:
|
||||||
build_script: ./scripts/build_smp.sh
|
build_script: ./scripts/build_smp.sh
|
||||||
test_script: ./scripts/test_smp.sh
|
test_script: ./scripts/test_smp.sh
|
||||||
cmake_path: ./test/smp/cmake
|
cmake_path: ./test/smp/cmake
|
||||||
deploy_url_affix: _smp
|
result_affix: SMP
|
||||||
result_affix: SMP
|
skip_deploy: true
|
||||||
|
deploy:
|
||||||
|
needs: [tx, smp]
|
||||||
|
uses: ./.github/workflows/regression_template.yml
|
||||||
|
with:
|
||||||
|
skip_test: true
|
||||||
|
skip_deploy: false
|
||||||
|
deploy_list: "ThreadX SMP"
|
||||||
Reference in New Issue
Block a user