From d44a9c39e17f0e2e5c9547a775eff5110551237e Mon Sep 17 00:00:00 2001 From: madonuko Date: Fri, 3 Jan 2025 16:37:39 +0800 Subject: [PATCH 1/5] feat(ci): add mock label to ci, also remove multilib --- .github/workflows/autobuild.yml | 6 +----- .github/workflows/json-build.yml | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 6bbb24ccf6..06bd21165b 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -68,11 +68,7 @@ jobs: dnf5 builddep -y ${dir}/*.spec - name: Build with Andaman - run: anda build ${{ matrix.pkg.pkg }} -rrpmbuild - - - name: Build with Andaman (alternate arch) - if: matrix.pkg.arch == 'x86_64' && matrix.pkg.labels['multilib'] - run: anda build ${{ matrix.pkg.pkg }} --package rpm -c terra-${{ matrix.version }}-i386 + run: anda build ${{ matrix.pkg.pkg }} ${{ matrix.pkg.labels['mock'] && '-c terra-${{ matrix.version }}-${{ matrix.pkg.arch }}' || '-rrpmbuild' }} - name: Generating artifact name id: art diff --git a/.github/workflows/json-build.yml b/.github/workflows/json-build.yml index faf88abe41..e62261764b 100644 --- a/.github/workflows/json-build.yml +++ b/.github/workflows/json-build.yml @@ -39,7 +39,7 @@ jobs: dnf5 builddep -y ${dir}/*.spec - name: Build with Andaman - run: anda build ${{ matrix.pkg.pkg }} -rrpmbuild + run: anda build anda/${{ matrix.pkg }}pkg ${{ matrix.pkg.labels['mock'] && '-c terra-${{ matrix.version }}-${{ matrix.pkg.arch }}' || '-rrpmbuild' }} - name: Generating artifact name id: art From ed34e5e75d94e4b144314aaf750e665d0744735b Mon Sep 17 00:00:00 2001 From: madonuko Date: Fri, 3 Jan 2025 16:40:22 +0800 Subject: [PATCH 2/5] feat: switch packages to use `arches = [...]` --- anda/games/gamescope-legacy/anda.hcl | 4 +--- anda/games/gamescope/anda.hcl | 2 +- anda/lib/mesa/anda.hcl | 2 +- anda/misc/extest/anda.hcl | 4 +--- anda/system/mesa-freeworld/anda.hcl | 2 +- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/anda/games/gamescope-legacy/anda.hcl b/anda/games/gamescope-legacy/anda.hcl index 272907ad53..db9bd0608a 100644 --- a/anda/games/gamescope-legacy/anda.hcl +++ b/anda/games/gamescope-legacy/anda.hcl @@ -1,8 +1,6 @@ project pkg { + arches = ["x86_64", "aarch64", "i386"] rpm { spec = "gamescope-legacy.spec" } - labels { - multilib = 1 - } } diff --git a/anda/games/gamescope/anda.hcl b/anda/games/gamescope/anda.hcl index 9aee67abdf..f3bf32281b 100755 --- a/anda/games/gamescope/anda.hcl +++ b/anda/games/gamescope/anda.hcl @@ -1,9 +1,9 @@ project pkg { + arches = ["x86_64", "aarch64", "i386"] rpm { spec = "gamescope.spec" } labels { - multilib = 1 extra = 1 } } diff --git a/anda/lib/mesa/anda.hcl b/anda/lib/mesa/anda.hcl index 7714a0b452..0a9eb9553e 100644 --- a/anda/lib/mesa/anda.hcl +++ b/anda/lib/mesa/anda.hcl @@ -1,9 +1,9 @@ project pkg { + arches = ["x86_64", "aarch64", "i386"] rpm { spec = "mesa.spec" } labels { - multilib = 1 extra = 1 } } diff --git a/anda/misc/extest/anda.hcl b/anda/misc/extest/anda.hcl index 9546109527..8c444ab5c5 100644 --- a/anda/misc/extest/anda.hcl +++ b/anda/misc/extest/anda.hcl @@ -1,8 +1,6 @@ project pkg { + arches = ["x86_64", "aarch64", "i386"] rpm { spec = "rust-extest.spec" } - labels { - multilib = 1 - } } diff --git a/anda/system/mesa-freeworld/anda.hcl b/anda/system/mesa-freeworld/anda.hcl index d30486b421..b10d43824d 100644 --- a/anda/system/mesa-freeworld/anda.hcl +++ b/anda/system/mesa-freeworld/anda.hcl @@ -1,9 +1,9 @@ project pkg { + arches = ["x86_64", "aarch64", "i386"] rpm { spec = "mesa-freeworld.spec" } labels { updbranch = 1 - multilib = 1 } } From da5738b133b4566ccdf26ab57f6fe1776818d86b Mon Sep 17 00:00:00 2001 From: madomado Date: Fri, 3 Jan 2025 16:41:48 +0800 Subject: [PATCH 3/5] ??? Signed-off-by: madomado --- .github/workflows/json-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/json-build.yml b/.github/workflows/json-build.yml index e62261764b..7cd1185ecc 100644 --- a/.github/workflows/json-build.yml +++ b/.github/workflows/json-build.yml @@ -39,7 +39,7 @@ jobs: dnf5 builddep -y ${dir}/*.spec - name: Build with Andaman - run: anda build anda/${{ matrix.pkg }}pkg ${{ matrix.pkg.labels['mock'] && '-c terra-${{ matrix.version }}-${{ matrix.pkg.arch }}' || '-rrpmbuild' }} + run: anda build ${{ matrix.pkg.pkg }} ${{ matrix.pkg.labels['mock'] && '-c terra-${{ matrix.version }}-${{ matrix.pkg.arch }}' || '-rrpmbuild' }} - name: Generating artifact name id: art From fc1203c019d997c12d5a111e3615b678415f238d Mon Sep 17 00:00:00 2001 From: madonuko Date: Fri, 3 Jan 2025 16:58:00 +0800 Subject: [PATCH 4/5] feat: add mock labels to pkgs --- anda/fusion/kmod-v4l2loopback/anda.hcl | 3 +++ anda/system/xpadneo/anda.hcl | 3 +++ anda/system/zenpower3/anda.hcl | 3 +++ 3 files changed, 9 insertions(+) diff --git a/anda/fusion/kmod-v4l2loopback/anda.hcl b/anda/fusion/kmod-v4l2loopback/anda.hcl index e5fb6fbc2b..329861eb08 100644 --- a/anda/fusion/kmod-v4l2loopback/anda.hcl +++ b/anda/fusion/kmod-v4l2loopback/anda.hcl @@ -2,4 +2,7 @@ project pkg { rpm { spec = "kmod-v4l2loopback.spec" } + labels { + mock = 1 + } } diff --git a/anda/system/xpadneo/anda.hcl b/anda/system/xpadneo/anda.hcl index a05aac8e28..522f0b2ff8 100644 --- a/anda/system/xpadneo/anda.hcl +++ b/anda/system/xpadneo/anda.hcl @@ -2,4 +2,7 @@ project pkg { rpm { spec = "xpadneo.spec" } + labels { + mock = 1 + } } diff --git a/anda/system/zenpower3/anda.hcl b/anda/system/zenpower3/anda.hcl index 288539e071..64d15acce8 100644 --- a/anda/system/zenpower3/anda.hcl +++ b/anda/system/zenpower3/anda.hcl @@ -2,4 +2,7 @@ project pkg { rpm { spec = "zenpower3.spec" } + labels { + mock = 1 + } } From dde32d427f50fe9f632266a40807cb0711125c2a Mon Sep 17 00:00:00 2001 From: madonuko Date: Fri, 3 Jan 2025 17:02:42 +0800 Subject: [PATCH 5/5] feat: add condition for setup scripts and dnf builddep --- .github/workflows/autobuild.yml | 2 ++ .github/workflows/json-build.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 06bd21165b..317f876dc5 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -56,6 +56,7 @@ jobs: run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: CI Setup Script + if: !matrix.pkg.labels ["mock"] run: | dir=$(dirname ${{ matrix.pkg.pkg }}) if [ -f $dir/ci_setup.rhai ]; then @@ -63,6 +64,7 @@ jobs: fi - name: Install Build Dependencies + if: !matrix.pkg.labels ["mock"] run: | dir=$(dirname ${{ matrix.pkg.pkg }}) dnf5 builddep -y ${dir}/*.spec diff --git a/.github/workflows/json-build.yml b/.github/workflows/json-build.yml index 7cd1185ecc..99a3cdb2e4 100644 --- a/.github/workflows/json-build.yml +++ b/.github/workflows/json-build.yml @@ -27,6 +27,7 @@ jobs: run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: CI Setup Script + if: !matrix.pkg.labels ["mock"] run: | dir=$(dirname ${{ matrix.pkg.pkg }}) if [ -f $dir/ci_setup.rhai ]; then @@ -34,6 +35,7 @@ jobs: fi - name: Install Build Dependencies + if: !matrix.pkg.labels ["mock"] run: | dir=$(dirname ${{ matrix.pkg.pkg }}) dnf5 builddep -y ${dir}/*.spec