From a993c405f113997491af4b92a488f383d96d1cf9 Mon Sep 17 00:00:00 2001 From: Lieven Hey Date: Fri, 7 Jun 2024 10:27:02 +0200 Subject: [PATCH 1/5] ci: test multi release --- .github/workflows/release-appimage.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release-appimage.yml b/.github/workflows/release-appimage.yml index d5816fec..8598ba99 100644 --- a/.github/workflows/release-appimage.yml +++ b/.github/workflows/release-appimage.yml @@ -21,6 +21,7 @@ jobs: uses: docker://ghcr.io/kdab/kdesrc-build:latest - name: Delete latest release + if: github.ref_name == 'master' run: | gh release delete continuous --cleanup-tag || true env: @@ -33,6 +34,7 @@ jobs: - name: Create latest release uses: ncipollo/release-action@v1 + if: github.ref_name == 'master' with: name: "continuous" tag: "continuous" @@ -44,6 +46,7 @@ jobs: ${{ github.workspace }}/*.AppImage - name: Release latest release + if: github.ref_name == 'master' run: | gh release edit continuous --draft=false || true env: @@ -54,3 +57,4 @@ jobs: with: token: ${{ github.token }} release-type: simple + target-branch: ${{ github.ref_name }} From 01c403340573698742d27b088f2bc1287a723fde Mon Sep 17 00:00:00 2001 From: Lieven Hey Date: Fri, 7 Jun 2024 11:50:28 +0200 Subject: [PATCH 2/5] fix: bugfix --- src/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 90fdf71a..8a0f8fb3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -100,6 +100,8 @@ int main(int argc, char** argv) initRCCIconTheme(); #endif + qDebug() << "TEST"; + QCommandLineParser parser; parser.setApplicationDescription(QStringLiteral("Linux perf GUI for performance analysis.")); parser.addHelpOption(); From 9d43198efb1b05a446577749d18dd76831c5bd16 Mon Sep 17 00:00:00 2001 From: Lieven Hey Date: Fri, 7 Jun 2024 12:42:08 +0200 Subject: [PATCH 3/5] fix: test --- src/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 8a0f8fb3..b5002bf4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -115,6 +115,8 @@ int main(int argc, char** argv) QStringLiteral("path")); parser.addOption(sysroot); + qDebug() << "bugfix"; + const auto kallsyms = QCommandLineOption( QStringLiteral("kallsyms"), QCoreApplication::translate("main", "Path to kallsyms file which is used to resolve kernel symbols."), From e92fba0da1fe83c7c7b52bc89453fbe3e9de5280 Mon Sep 17 00:00:00 2001 From: Lieven Hey Date: Mon, 10 Jun 2024 11:38:28 +0200 Subject: [PATCH 4/5] fix: use version.txt --- CMakeLists.txt | 5 ++++- version.txt | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 version.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b7083ea..0c17872f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,10 @@ cmake_minimum_required(VERSION 3.16) + +file(STRINGS "version.txt" version) + project( hotspot - VERSION 1.5.80 + VERSION ${version} LANGUAGES CXX C ) diff --git a/version.txt b/version.txt new file mode 100644 index 00000000..f0bb29e7 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +1.3.0 From cc3ba7096dc918e35ab5980511ccb3b438240fc8 Mon Sep 17 00:00:00 2001 From: Lieven Hey Date: Mon, 10 Jun 2024 12:36:46 +0200 Subject: [PATCH 5/5] chore: update release --- .github/workflows/release-appimage.yml | 46 +++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-appimage.yml b/.github/workflows/release-appimage.yml index 8598ba99..f7e1e9d1 100644 --- a/.github/workflows/release-appimage.yml +++ b/.github/workflows/release-appimage.yml @@ -6,6 +6,9 @@ on: - 'master' - '1.*' +env: + CONTINUOUS_BUILD: ${{ github.ref_name == 'master' && true || false }} + jobs: latest-release: runs-on: ubuntu-latest @@ -17,11 +20,32 @@ jobs: fetch-depth: 0 submodules: recursive + - name: TEST + run: echo "TEST ${{ env.CONTINUOUS_BUILD }}" + + - name: Bundle sources artifacts + run: | + [[ ${{ env.CONTINUOUS_BUILD }} == true ]] && version="continuous" || version=$(git describe --tags | sed -En 's/(v[0-9\.]+)-.*/\1/p') + + cp -r . "/tmp/hotspot-${version}" + cd /tmp + + tar czf "${{ github.workspace }}/hotspot-perfparser-${version}.tar.gz" --exclude=.git "hotspot-${version}/3rdparty/perfparser" + zip -r "${{ github.workspace }}/hotspot-perfparser-${version}.zip" "hotspot-${version}/3rdparty/perfparser" -x "hotspot-${version}/3rdparty/perfparser/.git" + + tar czf "${{ github.workspace }}/hotspot-PrefixTickLabels-${version}.tar.gz" --exclude=.git "hotspot-${version}/3rdparty/PrefixTickLabels" + zip -r "${{ github.workspace }}/hotspot-PrefixTickLabels-${version}.zip" "hotspot-${version}/3rdparty/PrefixTickLabels" -x "hotspot-${version}/3rdparty/PrefixTickLabels/.git" + + tar czf "${{ github.workspace }}/hotspot-${version}.tar.gz" --exclude=".git,perfparser,PrefixTickLabels" "hotspot-${version}" + zip -r "${{ github.workspace }}/hotspot-${version}.zip" "hotspot-${version}" -x "hotspot-${version}/3rdparty/" -x "hotspot-${version}/.git" + + rm -rf "hotspot-${version}" + - name: Build uses: docker://ghcr.io/kdab/kdesrc-build:latest - name: Delete latest release - if: github.ref_name == 'master' + if: ${{ env.CONTINUOUS_BUILD == true }} run: | gh release delete continuous --cleanup-tag || true env: @@ -29,12 +53,13 @@ jobs: - name: Rename artifacts run: | - cd ${{ github.workspace }} && mv hotspot-*.AppImage hotspot-continuous.AppImage - cd ${{ github.workspace }} && mv hotspot-debuginfo-*.tar.bz2 hotspot-debuginfo-continuous.tar.bz2 + [[ ${{ env.CONTINUOUS_BUILD }} == true ]] && version="continuous" || version=$(git describe --tags | sed -En 's/(v[0-9\.]+)-.*/\1/p') + cd ${{ github.workspace }} && mv hotspot-*.AppImage "hotspot-${version}.AppImage" + cd ${{ github.workspace }} && mv hotspot-debuginfo-*.tar.bz2 "hotspot-debuginfo-${version}.tar.bz2" - name: Create latest release uses: ncipollo/release-action@v1 - if: github.ref_name == 'master' + if: ${{ env.CONTINUOUS_BUILD == true }} with: name: "continuous" tag: "continuous" @@ -43,18 +68,29 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} artifacts: | ${{ github.workspace }}/hotspot-debuginfo-* + ${{ github.workspace }}/hotspot-perfparser-* + ${{ github.workspace }}/hotspot-PrefixTickLabels-* + ${{ github.workspace }}/hotspot-* ${{ github.workspace }}/*.AppImage - name: Release latest release - if: github.ref_name == 'master' + if: ${{ env.CONTINUOUS_BUILD == true }} run: | gh release edit continuous --draft=false || true env: GH_TOKEN: ${{ github.token }} - name: Create release PR + id: release uses: googleapis/release-please-action@v4.1.1 + if: ${{ env.CONTINUOUS_BUILD == false }} with: token: ${{ github.token }} release-type: simple target-branch: ${{ github.ref_name }} + + - name: Upload Release Artifact + if: ${{ steps.release.outputs.release_created }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh release upload ${{ steps.release.outputs.tag_name }} ${{ github.workspace }}/hotspot-debuginfo-* ${{ github.workspace }}/hotspot-perfparser-* ${{ github.workspace }}/hotspot-PrefixTickLabels-* ${{ github.workspace }}/hotspot-* ${{ github.workspace }}/*.AppImage