Skip to content

Commit

Permalink
Release devint2
Browse files Browse the repository at this point in the history
  • Loading branch information
brondani committed Jun 20, 2024
1 parent 4f5442d commit aa1cfcb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 124 deletions.
112 changes: 1 addition & 111 deletions .github/workflows/projmgr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:
if: |
github.event_name == 'release' &&
startsWith(github.ref, 'refs/tags/tools/projmgr/')
needs: [ build, build-swig, unittest, coverage ]
needs: [ build, build-swig, unittest ]
runs-on: ubuntu-22.04
timeout-minutes: 15

Expand Down Expand Up @@ -270,25 +270,6 @@ jobs:
overwrite: true
asset_name: testreport.zip

- name: Download coverage report
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: coverage-report-projmgr
path: tools/coverage/

- name: Zip coverage reports
run: zip -r coverage.zip coverage_projmgr
working-directory: tools/coverage

- name: Attach coverage archive to release assets
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: tools/coverage/coverage.zip
tag: ${{ github.ref }}
overwrite: true
asset_name: coverage.zip

unittest:
needs: [ setup, matrix_prep ]
runs-on: ${{ matrix.runs_on }}
Expand Down Expand Up @@ -335,97 +316,6 @@ jobs:
retention-days: ${{ needs.setup.outputs.retention_days }}
if-no-files-found: error

coverage:
if: |
(github.event_name == 'pull_request') ||
(github.event_name == 'workflow_dispatch') ||
(github.event_name == 'push') ||
(github.event_name == 'release' && startsWith(github.ref, 'refs/tags/tools/projmgr/')) ||
((github.event.schedule != '') && (!github.event.repository.private))
env:
lcov_base: https://github.com/linux-test-project/lcov/releases/download/v1.15/
lcov_installer: lcov-1.15.tar.gz
runs-on: ubuntu-22.04
timeout-minutes: 15
steps:
- name: Install linux deps
run: |
sudo apt-get update
sudo apt-get install \
lcov
- name: Checkout devtools
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
submodules: true

# https://github.com/Open-CMSIS-Pack/devtools-build-action
- name: Build ProjMgrUnitTests
uses: Open-CMSIS-Pack/devtools-build-action@79c0fc7d7bc834eb12aa1e319756deab0dda773f # arm64
with:
add_cmake_variables: -DCOVERAGE=ON
arch: amd64
build_type: Debug
target: ProjMgrUnitTests

- name: Run ProjMgrUnitTests
run: |
ctest -V -C Debug -R ProjMgrUnitTests
working-directory: ./build

- name: Get retention days
id: var
run: |
echo "retention_days=$(echo '${{ (!github.event.repository.private && (github.event_name == 'push' || github.event.schedule != '')) && '7' || '1' }}')" >> $GITHUB_OUTPUT
- name: Archive test report
if: (github.event_name == 'push')
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: unit_test_result_projmgr-linux-amd64
path: ./build/test_reports/projmgrunittests-*.xml
retention-days: ${{ steps.var.outputs.retention_days }}
if-no-files-found: error

# Needs to be removed once the bug is resolved
# lcov reporting 1.14 on 1.15 version
# https://groups.google.com/g/linux.debian.bugs.dist/c/a9SZGCENJ2s?pli=1
- name: Setup lcov1.15
run: |
wget -q ${{ env.lcov_base }}/${{ env.lcov_installer }}
tar -xvf ${{ env.lcov_installer }}
working-directory: ./build/tools/projmgr

- name: Generate coverage report
run: |
lcov-1.15/bin/lcov --rc lcov_branch_coverage=1 --rc geninfo_no_exception_branch=1 -c --directory . --output-file full_coverage.info
lcov-1.15/bin/lcov --rc lcov_branch_coverage=1 --rc geninfo_no_exception_branch=1 -e full_coverage.info '/tools/projmgr/include/*' '*/tools/projmgr/src/*' -o coverage_projmgr.info
genhtml coverage_projmgr.info --output-directory coverage_projmgr --branch-coverage
working-directory: ./build/tools/projmgr/

- name: Upload Report to Codecov
if: ${{ !github.event.repository.private }}
uses: Wandalen/wretry.action@6feedb7dedadeb826de0f45ff482b53b379a7844 # v3.5.0
with:
action: codecov/codecov-action@v4
with: |
files: ./build/tools/projmgr/coverage_projmgr.info
fail_ci_if_error: true
flags: projmgr-cov
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
attempt_limit: 3
attempt_delay: 5000

- name: Archive coverage report
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: coverage-report-projmgr
path: |
./build/tools/projmgr/coverage_projmgr/
./build/tools/projmgr/coverage_projmgr.info
retention-days: ${{ steps.var.outputs.retention_days }}
if-no-files-found: error

test-results-preparation:
name: "Publish Tests Results"
Expand Down
14 changes: 7 additions & 7 deletions tools/buildmgr/cbuildgen/installer/create_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ curl --retry 3 -L ${cpackget_base}_windows_arm64.zip -o temp.zip && unzip -p t
curl --retry 3 -L ${cpackget_base}_darwin_arm64.tar.gz -o - | tar xzfO - --wildcards '*cpackget' > ${distdir}/bin/cpackget.mac-arm64

# Get cbuild2cmake
cbuild2cmake_version="0.9.1"
cbuild2cmake_base=https://github.com/Open-CMSIS-Pack/cbuild2cmake/releases/download/v${cbuild2cmake_version}/cbuild2cmake_${cbuild2cmake_version}
cbuild2cmake_version="0.9.2-devint2"
cbuild2cmake_base=https://github.com/brondani/cbuild2cmake/releases/download/v${cbuild2cmake_version}/cbuild2cmake_${cbuild2cmake_version}
curl --retry 3 -L ${cbuild2cmake_base}_linux_amd64.tar.gz -o - | tar xzfO - --wildcards '*cbuild2cmake' > ${distdir}/bin/cbuild2cmake.lin-amd64
curl --retry 3 -L ${cbuild2cmake_base}_windows_amd64.zip -o temp.zip && unzip -p temp.zip '*/cbuild2cmake.exe' > ${distdir}/bin/cbuild2cmake.exe-amd64 && rm temp.zip
curl --retry 3 -L ${cbuild2cmake_base}_darwin_amd64.tar.gz -o - | tar xzfO - --wildcards '*cbuild2cmake' > ${distdir}/bin/cbuild2cmake.mac-amd64
Expand All @@ -81,7 +81,7 @@ curl --retry 3 -L ${cbuild2cmake_base}_windows_arm64.zip -o temp.zip && unzip
curl --retry 3 -L ${cbuild2cmake_base}_darwin_arm64.tar.gz -o - | tar xzfO - --wildcards '*cbuild2cmake' > ${distdir}/bin/cbuild2cmake.mac-arm64

# Get cbridge
cbridge_version="0.9.5"
cbridge_version="0.9.6"
cbridge_base=https://github.com/Open-CMSIS-Pack/generator-bridge/releases/download/v${cbridge_version}/cbridge_${cbridge_version}
curl --retry 3 -L ${cbridge_base}_linux_amd64.tar.gz -o - | tar xzf - &&\
cp cbridge_${cbridge_version}_linux_amd64/cbridge ${distdir}/bin/cbridge.lin-amd64 &&\
Expand Down Expand Up @@ -109,8 +109,8 @@ curl --retry 3 -L ${cbridge_base}_darwin_arm64.tar.gz -o - | tar xzf - &&\
rm -r cbridge_${cbridge_version}_darwin_arm64

# Get csolution
csolution_version="2.4.0"
csolution_base=https://github.com/Open-CMSIS-Pack/devtools/releases/download/tools%2Fprojmgr%2F${csolution_version}/projmgr.zip
csolution_version="2.5.0-devint2"
csolution_base=https://github.com/brondani/devtools/releases/download/tools%2Fprojmgr%2F${csolution_version}/projmgr.zip
curl --retry 3 -L ${csolution_base} -o temp.zip && unzip -q -d temp temp.zip
cp 'temp/bin/linux-amd64/csolution' ${distdir}/bin/csolution.lin-amd64
cp 'temp/bin/windows-amd64/csolution.exe' ${distdir}/bin/csolution.exe-amd64
Expand All @@ -122,8 +122,8 @@ cp -r temp/etc/* ${distdir}/etc
rm temp.zip && rm -rf temp

# Get cbuild
cbuild_version="2.4.0"
cbuild_base=https://github.com/Open-CMSIS-Pack/cbuild/releases/download/v${cbuild_version}/cbuild_${cbuild_version}
cbuild_version="2.5.0-devint2"
cbuild_base=https://github.com/brondani/cbuild/releases/download/v${cbuild_version}/cbuild_${cbuild_version}
curl --retry 3 -L ${cbuild_base}_linux_amd64.tar.gz -o - | tar xzfO - --wildcards '*cbuild' > ${distdir}/bin/cbuild.lin-amd64
curl --retry 3 -L ${cbuild_base}_windows_amd64.zip -o temp.zip && unzip -p temp.zip '*/cbuild.exe' > ${distdir}/bin/cbuild.exe-amd64 && rm temp.zip
curl --retry 3 -L ${cbuild_base}_darwin_amd64.tar.gz -o - | tar xzfO - --wildcards '*cbuild' > ${distdir}/bin/cbuild.mac-amd64
Expand Down
12 changes: 6 additions & 6 deletions tools/buildmgr/cbuildgen/installer/make_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ cpackget_base=https://github.com/Open-CMSIS-Pack/cpackget/releases/download/v${c
curl --retry 3 -L ${cpackget_base}_linux_amd64.tar.gz -o - | tar xzfO - --wildcards '*cpackget' > ${input}/bin/cpackget.lin-amd64

# Get cbuild2cmake
cbuild2cmake_version="0.9.1"
cbuild2cmake_base=https://github.com/Open-CMSIS-Pack/cbuild2cmake/releases/download/v${cbuild2cmake_version}/cbuild2cmake_${cbuild2cmake_version}
cbuild2cmake_version="0.9.2-devint2"
cbuild2cmake_base=https://github.com/brondani/cbuild2cmake/releases/download/v${cbuild2cmake_version}/cbuild2cmake_${cbuild2cmake_version}
curl --retry 3 -L ${cbuild2cmake_base}_linux_amd64.tar.gz -o - | tar xzfO - --wildcards '*cbuild2cmake' > ${distdir}/bin/cbuild2cmake.lin-amd64

# Get generator-bridge
Expand All @@ -113,16 +113,16 @@ curl --retry 3 -L ${cbridge_base}_linux_amd64.tar.gz -o - | tar xzf - &&\
rm -r cbridge_${cbridge_version}_linux_amd64

# Get csolution
csolution_version="2.4.0"
csolution_base=https://github.com/Open-CMSIS-Pack/devtools/releases/download/tools%2Fprojmgr%2F${csolution_version}/projmgr.zip
csolution_version="2.5.0-devint2"
csolution_base=https://github.com/brondani/devtools/releases/download/tools%2Fprojmgr%2F${csolution_version}/projmgr.zip
curl --retry 3 -L ${csolution_base} -o temp.zip && unzip -q -d temp temp.zip
cp 'temp/bin/linux-amd64/csolution' ${input}/bin/csolution.lin-amd64
cp -r temp/etc/* etc/${PACKAGE_NAME}
cp -r temp/etc/* usr/lib/${PACKAGE_NAME} && rm temp.zip && rm -rf temp

# Get cbuild
cbuild_version="2.4.0"
cbuild_base=https://github.com/Open-CMSIS-Pack/cbuild/releases/download/v${cbuild_version}/cbuild_${cbuild_version}
cbuild_version="2.5.0-devint2"
cbuild_base=https://github.com/brondani/cbuild/releases/download/v${cbuild_version}/cbuild_${cbuild_version}
curl --retry 3 -L ${cbuild_base}_linux_amd64.tar.gz -o - | tar xzfO - --wildcards '*cbuild' > ${input}/bin/cbuild.lin-amd64

cp -r ${input}/bin usr/lib/${PACKAGE_NAME} # This should be in /usr/bin but cannot for the time being.
Expand Down

0 comments on commit aa1cfcb

Please sign in to comment.