diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..12a2fdb0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +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 + 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 \ + 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 + 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 + + 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 diff --git a/.github/workflows/gettext.yml b/.github/workflows/gettext.yml new file mode 100644 index 00000000..14cb70ed --- /dev/null +++ b/.github/workflows/gettext.yml @@ -0,0 +1,24 @@ +name: Gettext Updates + +on: + push: + branches: [dev] + +jobs: + build: + runs-on: ubuntu-22.04 + container: + image: ghcr.io/elementary/docker:next-unstable + + steps: + - name: Clone repository + uses: actions/checkout@v4 + with: + token: ${{ secrets.GIT_USER_TOKEN }} + + - name: Update Translation Files + uses: elementary/actions/gettext-template@main + 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/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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..8a6c795d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,18 @@ +name: Release +on: + pull_request: + branches: [ dev ] + 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: + GIT_USER_TOKEN: "${{ secrets.GIT_USER_TOKEN }}" + GIT_USER_NAME: "elementaryBot" + GIT_USER_EMAIL: "builds@elementary.io" + with: + release_branch: 'noble' \ No newline at end of file