From a79bf1e87d696ad1b899de938e4c2cfaeb31fa4a Mon Sep 17 00:00:00 2001 From: stsdc <6031763+stsdc@users.noreply.github.com> Date: Mon, 7 Oct 2024 23:09:38 +0200 Subject: [PATCH 01/15] Add ci.yml --- .github/workflows/ci.yml | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..d5920d2d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +name: CI + +on: + pull_request: + types: + - opened + - reopened + - synchronize + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + version: [stable, unstable, development-target] + container: + image: ghcr.io/elementary/docker:${{ matrix.version }} + + steps: + - uses: actions/checkout@v4 + - name: Install Dependencies + run: | + apt update + apt install -y libgala-dev libgee-0.8-dev libglib2.0-dev libgranite-dev libgtk-3-dev libhandy-1-dev + apt install -y libdbus-glib-1-dev libwnck-3-dev libgtop2-dev libwingpanel-3.0-dev libudisks2-dev + apt install -y libxnvctrl0 libxnvctrl-dev libcurl4-gnutls-dev libflatpak-dev + apt install -y meson valac sassc git + - name: Build + run: | + meson setup build + meson compile -C build + meson test -C build --print-errorlogs + meson install -C build + + lint: + runs-on: ubuntu-latest + + container: + image: valalang/lint + + steps: + - uses: actions/checkout@v4 + - name: Lint + run: io.elementary.vala-lint -d . \ No newline at end of file From f979022accf8cb28f6c8f7173b3434d4ea3448fc Mon Sep 17 00:00:00 2001 From: stsdc <6031763+stsdc@users.noreply.github.com> Date: Mon, 7 Oct 2024 23:23:34 +0200 Subject: [PATCH 02/15] Use submodules --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5920d2d..8ef87bb4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,9 @@ jobs: steps: - uses: actions/checkout@v4 + with: + submodules: true + - name: Install Dependencies run: | apt update From 8cb041890d7c01c5d60a1a7ccf946eb887c09dc7 Mon Sep 17 00:00:00 2001 From: stsdc <6031763+stsdc@users.noreply.github.com> Date: Mon, 7 Oct 2024 23:29:48 +0200 Subject: [PATCH 03/15] Add libjson-glib-dev to deps to install --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ef87bb4..a7559082 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: apt update apt install -y libgala-dev libgee-0.8-dev libglib2.0-dev libgranite-dev libgtk-3-dev libhandy-1-dev apt install -y libdbus-glib-1-dev libwnck-3-dev libgtop2-dev libwingpanel-3.0-dev libudisks2-dev - apt install -y libxnvctrl0 libxnvctrl-dev libcurl4-gnutls-dev libflatpak-dev + apt install -y libxnvctrl0 libxnvctrl-dev libcurl4-gnutls-dev libflatpak-dev libjson-glib-dev apt install -y meson valac sassc git - name: Build run: | From e9edcb908d9d59a6ad43eb157410ae705cc576d5 Mon Sep 17 00:00:00 2001 From: stsdc <6031763+stsdc@users.noreply.github.com> Date: Mon, 7 Oct 2024 23:32:55 +0200 Subject: [PATCH 04/15] Remove meson test, since it executes tests on submodules which fail --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7559082..084c0e87 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: run: | meson setup build meson compile -C build - meson test -C build --print-errorlogs + # meson test -C build --print-errorlogs meson install -C build lint: From 6154dc6ad285d4a1abbe8f6271c23127c7198933 Mon Sep 17 00:00:00 2001 From: stsdc <6031763+stsdc@users.noreply.github.com> Date: Mon, 7 Oct 2024 23:53:54 +0200 Subject: [PATCH 05/15] Add release and gettext actions --- .github/workflows/gettext.yml | 29 +++++++++++++++++++++++++++++ .github/workflows/release.yml | 14 ++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 .github/workflows/gettext.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/gettext.yml b/.github/workflows/gettext.yml new file mode 100644 index 00000000..ed5c70ec --- /dev/null +++ b/.github/workflows/gettext.yml @@ -0,0 +1,29 @@ +name: Gettext Updates + +on: + push: + branches: [master] + +jobs: + build: + runs-on: ubuntu-22.04 + container: + image: ghcr.io/elementary/docker:next-unstable + + steps: + - name: Install git + run: | + apt-get update + apt-get install git -y + + - name: Clone repository + uses: actions/checkout@v4 + with: + token: ${{ secrets.GIT_USER_TOKEN }} + + - name: Update Translation Files + uses: elementary/actions/gettext-template@next + env: + GIT_USER_TOKEN: ${{ secrets.GIT_USER_TOKEN }} + GIT_USER_NAME: "elementaryBot" + GIT_USER_EMAIL: "builds@elementary.io" \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..b0db607a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,14 @@ +name: Release +on: + pull_request: + branches: [ $default-branch ] + types: closed +jobs: + release: + runs-on: ubuntu-latest + if: github.event.pull_request.merged == true && true == contains(join(github.event.pull_request.labels.*.name), 'Release') + steps: + - uses: actions/checkout@v4 + - uses: elementary/actions/release@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 1fea57a4f050cd90ac937dccc0374e3037edfd08 Mon Sep 17 00:00:00 2001 From: stsdc <6031763+stsdc@users.noreply.github.com> Date: Mon, 7 Oct 2024 23:54:06 +0200 Subject: [PATCH 06/15] Remove old actions --- .github/workflows/lint.yml | 17 -------- .github/workflows/main.yml | 33 --------------- .github/workflows/publish-copr.yml | 54 ------------------------- .github/workflows/publish-launchpad.yml | 54 ------------------------- 4 files changed, 158 deletions(-) delete mode 100644 .github/workflows/lint.yml delete mode 100644 .github/workflows/main.yml delete mode 100644 .github/workflows/publish-copr.yml delete mode 100644 .github/workflows/publish-launchpad.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index f784c9c9..00000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Lint - -on: [push, pull_request] - -jobs: - - lint: - runs-on: ubuntu-latest - container: - image: valalang/lint - - steps: - - uses: actions/checkout@v1 - with: - submodules: false - - name: Lint - run: io.elementary.vala-lint -d . diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 56c5845e..00000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Build - -on: [push, pull_request] - -jobs: - - build: - - runs-on: ubuntu-latest - - container: - image: elementary/docker:unstable - - steps: - - uses: actions/checkout@v1 - with: - submodules: true - - - name: Install Dependencies - run: | - apt update - apt install -y libgala-dev libgee-0.8-dev libglib2.0-dev libgranite-dev libgtk-3-dev libhandy-1-dev - apt install -y libdbus-glib-1-dev libwnck-3-dev libgtop2-dev libwingpanel-3.0-dev libudisks2-dev - apt install -y libxnvctrl0 libxnvctrl-dev libcurl4-gnutls-dev libflatpak-dev - apt install -y meson valac sassc git - - name: Build - env: - DESTDIR: out - run: | - meson --prefix=/usr -Dindicator-wingpanel=enabled build - cd build - ninja - diff --git a/.github/workflows/publish-copr.yml b/.github/workflows/publish-copr.yml deleted file mode 100644 index 09394d17..00000000 --- a/.github/workflows/publish-copr.yml +++ /dev/null @@ -1,54 +0,0 @@ ---- -name: Publish on Copr - -on: - release: - types: [published] - -jobs: - build: - name: Submit a build for Copr - container: fedora:36 - runs-on: ubuntu-latest - - steps: - - name: Check out proper version of sources - uses: actions/checkout@v1 - with: - submodules: true - - - name: Install API token for copr-cli - env: - API_TOKEN_CONTENT: ${{ secrets.COPR_API_TOKEN }} - run: | - mkdir -p "$HOME/.config" - echo "$API_TOKEN_CONTENT" > "$HOME/.config/copr" - - # - name: Check spec for bumped version - # run: | - # grep -q ${{ github.event.release.tag_name }} spc.spec || { echo "Version not bumped!" && exit 1; } - - - name: Install tooling for source RPM build - run: | - dnf -y install @development-tools @rpm-development-tools - dnf -y install copr-cli - - - name: Archive the source - run: | - git archive --prefix "monitor/" -o "monitor.tar" HEAD - git submodule foreach --recursive "git archive --prefix=monitor/\$path/ --output=\$sha1.tar HEAD && tar --concatenate --file=$(pwd)/monitor.tar \$sha1.tar && rm \$sha1.tar" - gzip "monitor.tar" - - - name: Build the source RPM - run: | - rm -f *.src.rpm ; \ - rpmbuild \ - --define "_sourcedir `pwd`" \ - --define "_rpmdir `pwd`" \ - --define "_builddir `pwd`" \ - --define "_specdir `pwd`" \ - --define "_srcrpmdir `pwd`" \ - -bs *.spec - - - name: Submit the build by uploading the source RPM - run: copr build stsdc/monitor *.src.rpm diff --git a/.github/workflows/publish-launchpad.yml b/.github/workflows/publish-launchpad.yml deleted file mode 100644 index 9a62bf83..00000000 --- a/.github/workflows/publish-launchpad.yml +++ /dev/null @@ -1,54 +0,0 @@ ---- -name: Publish on Launchpad - -on: - release: - types: [published] - -env: - LANG: "pl_PL.UTF-8" - -jobs: - build: - name: Submit a build for Launchpad - runs-on: ubuntu-latest - container: - image: elementary/docker:stable - - steps: - - - name: Install GPG Agent - run: apt update && apt install -y gpg-agent - - - name: Import GPG key - uses: crazy-max/ghaction-import-gpg@v5 - with: - gpg_private_key: ${{ secrets.GPG_SIGNING_KEY }} - passphrase: ${{ secrets.GPG_PASSPHRASE }} - - - name: Check out source code - uses: actions/checkout@v1 - with: - submodules: true - - # - name: Check changelog for bumped version - # run: | - # grep -q ${{ github.event.release.tag_name }} debian/changelog || { echo "Version not bumped!" && exit 1; } - - - name: Install build dependencies - run: | - apt update - apt install -y devscripts dput locales - apt install -y libgala-dev libgee-0.8-dev libglib2.0-dev libgranite-dev libgtk-3-dev libhandy-1-dev libxnvctrl0 libxnvctrl-dev - apt install -y libdbus-glib-1-dev libwnck-3-dev libgtop2-dev libwingpanel-3.0-dev appstream debhelper libudisks2-dev libcurl4-gnutls-dev libflatpak-dev - apt install -y meson valac sassc git - - - name: Set locale - run: locale-gen ${{ env.LANG }} && update-locale LANG=${{ env.LANG }} - - - name: Build the package - run: LC_ALL=${{ env.LANG }} debuild --no-lintian -S - - - name: Send to Launchpad - run: | - dput ppa:stsdc/monitor ../*_source.changes From 4bb4232c76408c679b692f33de9393f393c61ff8 Mon Sep 17 00:00:00 2001 From: stsdc <6031763+stsdc@users.noreply.github.com> Date: Mon, 7 Oct 2024 23:58:19 +0200 Subject: [PATCH 07/15] Use GIT_USER_TOKEN --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b0db607a..ae4f9e10 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,4 +11,6 @@ jobs: - uses: actions/checkout@v4 - uses: elementary/actions/release@main env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GIT_USER_TOKEN: "${{ secrets.GIT_USER_TOKEN }}" + GIT_USER_NAME: "elementaryBot" + GIT_USER_EMAIL: "builds@elementary.io" \ No newline at end of file From fc489dd476be5d40dbe6ee5cadc49e85e5f6bff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw?= <6031763+stsdc@users.noreply.github.com> Date: Tue, 8 Oct 2024 09:57:51 +0200 Subject: [PATCH 08/15] Update .github/workflows/gettext.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Danielle Foré --- .github/workflows/gettext.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/gettext.yml b/.github/workflows/gettext.yml index ed5c70ec..ce666e7c 100644 --- a/.github/workflows/gettext.yml +++ b/.github/workflows/gettext.yml @@ -11,18 +11,13 @@ jobs: image: ghcr.io/elementary/docker:next-unstable steps: - - name: Install git - run: | - apt-get update - apt-get install git -y - - name: Clone repository uses: actions/checkout@v4 with: token: ${{ secrets.GIT_USER_TOKEN }} - name: Update Translation Files - uses: elementary/actions/gettext-template@next + uses: elementary/actions/gettext-template@main env: GIT_USER_TOKEN: ${{ secrets.GIT_USER_TOKEN }} GIT_USER_NAME: "elementaryBot" From a84a4fb9c1bb393f1898f37e52c8107974e82452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw?= <6031763+stsdc@users.noreply.github.com> Date: Tue, 8 Oct 2024 09:58:20 +0200 Subject: [PATCH 09/15] Update .github/workflows/release.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Danielle Foré --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae4f9e10..7b246da8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,4 +13,6 @@ jobs: env: GIT_USER_TOKEN: "${{ secrets.GIT_USER_TOKEN }}" GIT_USER_NAME: "elementaryBot" - GIT_USER_EMAIL: "builds@elementary.io" \ No newline at end of file + GIT_USER_EMAIL: "builds@elementary.io" + with: + release_branch: 'noble' \ No newline at end of file From e76214658549eef64d440b40bb4b36b88c634b0e Mon Sep 17 00:00:00 2001 From: stsdc <6031763+stsdc@users.noreply.github.com> Date: Tue, 8 Oct 2024 10:00:17 +0200 Subject: [PATCH 10/15] Fix yaml syntax --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7b246da8..6310dcc7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,5 +14,5 @@ jobs: GIT_USER_TOKEN: "${{ secrets.GIT_USER_TOKEN }}" GIT_USER_NAME: "elementaryBot" GIT_USER_EMAIL: "builds@elementary.io" - with: + with: release_branch: 'noble' \ No newline at end of file From 6686cea8333ed75ef3b436ccecea17764b330f94 Mon Sep 17 00:00:00 2001 From: stsdc <6031763+stsdc@users.noreply.github.com> Date: Tue, 8 Oct 2024 16:49:53 +0200 Subject: [PATCH 11/15] Add a comment about disabled tests --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 084c0e87..1cb4c0b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,7 @@ jobs: run: | meson setup build meson compile -C build + # Tests disabled since it starts to test live-chart and some tests fail there # meson test -C build --print-errorlogs meson install -C build From fe3d48ef3540b55dad6633534063f3b8f3f7d618 Mon Sep 17 00:00:00 2001 From: stsdc <6031763+stsdc@users.noreply.github.com> Date: Tue, 8 Oct 2024 16:52:18 +0200 Subject: [PATCH 12/15] Remove multiple apt install --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1cb4c0b9..12a2fdb0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,10 +26,10 @@ jobs: - name: Install Dependencies run: | apt update - apt install -y libgala-dev libgee-0.8-dev libglib2.0-dev libgranite-dev libgtk-3-dev libhandy-1-dev - apt install -y libdbus-glib-1-dev libwnck-3-dev libgtop2-dev libwingpanel-3.0-dev libudisks2-dev - apt install -y libxnvctrl0 libxnvctrl-dev libcurl4-gnutls-dev libflatpak-dev libjson-glib-dev - apt install -y meson valac sassc git + apt install -y libgala-dev libgee-0.8-dev libglib2.0-dev libgranite-dev libgtk-3-dev libhandy-1-dev \ + libdbus-glib-1-dev libwnck-3-dev libgtop2-dev libwingpanel-3.0-dev libudisks2-dev \ + libxnvctrl0 libxnvctrl-dev libcurl4-gnutls-dev libflatpak-dev libjson-glib-dev \ + meson valac sassc git - name: Build run: | meson setup build From 62fc078c7da66db08b2a6eddcaa56c7aa773b4df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw?= <6031763+stsdc@users.noreply.github.com> Date: Tue, 8 Oct 2024 17:24:13 +0200 Subject: [PATCH 13/15] Update .github/workflows/gettext.yml Co-authored-by: Ryo Nakano --- .github/workflows/gettext.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gettext.yml b/.github/workflows/gettext.yml index ce666e7c..14cb70ed 100644 --- a/.github/workflows/gettext.yml +++ b/.github/workflows/gettext.yml @@ -2,7 +2,7 @@ name: Gettext Updates on: push: - branches: [master] + branches: [dev] jobs: build: From 596479c235f759b63736c1d91e0571d6481370c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw?= <6031763+stsdc@users.noreply.github.com> Date: Wed, 9 Oct 2024 10:57:03 +0200 Subject: [PATCH 14/15] Run Release action on PR that targets master branch --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6310dcc7..0f9c291c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,7 @@ name: Release on: pull_request: - branches: [ $default-branch ] + branches: [ master ] types: closed jobs: release: From c86bc2485ec00638cb8cbfb69736b9440b52fcdc Mon Sep 17 00:00:00 2001 From: stsdc <6031763+stsdc@users.noreply.github.com> Date: Wed, 9 Oct 2024 20:13:53 +0200 Subject: [PATCH 15/15] dev is the main --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0f9c291c..8a6c795d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,7 @@ name: Release on: pull_request: - branches: [ master ] + branches: [ dev ] types: closed jobs: release: