Skip to content

Build release/2.7 ๐Ÿš€ #106

Build release/2.7 ๐Ÿš€

Build release/2.7 ๐Ÿš€ #106

Workflow file for this run

name: Build Release
run-name: Build ${{ github.ref_name }} ๐Ÿš€
on:
push:
branches:
- main
- release/*
defaults:
run:
shell: bash
jobs:
CallPR:
name: โš™ Run PR Workflow
uses: ./.github/workflows/build-pr.yml
with:
is_called_workflow: true
do_instrumentation: ${{ github.ref_name == 'main' }}
secrets: inherit
DeployDocumentation:
name: โœˆ๏ธ Deploy documentation
runs-on: [ self-hosted, Linux, Docker ]
if: github.ref_name == 'main'
permissions: write-all
needs:
- CallPR
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0 # load all commits
- name: Initial repo config
run: tools/initial-repo-config.sh
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: Documentation-assets
- name: Deploy documentation to github pages
run: tools/publish-docs-on-github.sh
DeployInstaller:
name: โœˆ๏ธ Deploy Installer
runs-on: [ self-hosted, Linux, Docker ]
permissions: write-all
needs:
- CallPR
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0 # load all commits
- name: Initial repo config
run: tools/initial-repo-config.sh
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: BuildInstaller-user-assets
- name: Deploy release assets to github
run: tools/upload-github-release-asset.sh "${{ github.token }}"
GenerateReport:
name: ๐Ÿ“Š Generate Reports
runs-on: [ self-hosted, Linux, Docker ]
if: github.ref_name == 'main'
needs:
- CallPR
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initial repo config
run: tools/initial-repo-config.sh
- name: Download all artifacts
id: download
uses: actions/download-artifact@v3
with:
path: artifacts
- name: ๐Ÿ“ฅ Download report cache from FTP
id: cache-download
run: |
tools/ftp-upload/download-files.sh \
-s "${{ vars.GHA_MIES_FTP_ARTEFACT_STORAGE_DNS }}" \
-u "${{ secrets.GHA_MIES_FTP_ARTEFACT_STORAGE_USER }}" \
-p "${{ secrets.GHA_MIES_FTP_ARTEFACT_STORAGE_PWD }}" \
-d "history" \
-t "cache/coverage-history"
- name: ๐Ÿ“Š Generate Reports
id: gen
run: |
tools/report-generator/build.sh \
-s "$(pwd)" \
-d "${{ steps.download.outputs.download-path }}" \
-h "${{ steps.cache-download.outputs.data }}" \
-o report \
-l "${{ secrets.GHA_MIES_REPORTGENERATOR_LICENSE }}"
- name: ๐Ÿ“ค Upload latest report to FTP
run: |
tools/ftp-upload/upload-files.sh \
-s "${{ vars.GHA_MIES_FTP_ARTEFACT_STORAGE_DNS }}" \
-u "${{ secrets.GHA_MIES_FTP_ARTEFACT_STORAGE_USER }}" \
-p "${{ secrets.GHA_MIES_FTP_ARTEFACT_STORAGE_PWD }}" \
-d "${{ steps.gen.outputs.report }}" \
-t "report/coverage"
- name: ๐Ÿ“ค Upload report cache to FTP
run: |
tools/ftp-upload/upload-files.sh \
-s "${{ vars.GHA_MIES_FTP_ARTEFACT_STORAGE_DNS }}" \
-u "${{ secrets.GHA_MIES_FTP_ARTEFACT_STORAGE_USER }}" \
-p "${{ secrets.GHA_MIES_FTP_ARTEFACT_STORAGE_PWD }}" \
-d "${{ steps.gen.outputs.history }}" \
-t "cache/coverage-history"
- name: upload artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: report-artifacts
path: |
${{ steps.gen.outputs.report }}
if-no-files-found: warn
FTPUpload:
name: ๐Ÿ“ฆ FTP Upload Artifacts
runs-on: [ self-hosted, Linux, Docker ]
if: always()
needs:
# All jobs that create new artifacts
- CallPR
- GenerateReport
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initial repo config
run: tools/initial-repo-config.sh
- name: Download all artifacts
id: download
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Flatten artifact structure
run: |
find "${{ steps.download.outputs.download-path }}" -mindepth 1 -maxdepth 1 -type d |\
xargs -I {} tools/ftp-upload/flatten-files.sh "{}"
- name: Compress NWB artifacts
run: |
for dir in test-itc-assets test-ni-assets
do
tar --remove-files --use-compress-program=zstd -cvf $dir/NWB.tar.zst $dir/*nwb
done
working-directory: ${{ steps.download.outputs.download-path }}
- name: Upload artifacts using FTP
run: |
tools/ftp-upload/upload-files.sh \
-s "${{ vars.GHA_MIES_FTP_ARTEFACT_STORAGE_DNS }}" \
-u "${{ secrets.GHA_MIES_FTP_ARTEFACT_STORAGE_USER }}" \
-p "${{ secrets.GHA_MIES_FTP_ARTEFACT_STORAGE_PWD }}" \
-d "${{ steps.download.outputs.download-path }}" \
-t "deploy/$(echo "${{ github.ref_name }}" | sed "s@/@_@g")/${{ github.sha }}/${{ github.run_attempt }}"