From e85628a37b575b1016e140f4e4bfedd2c7b704d6 Mon Sep 17 00:00:00 2001 From: madonuko Date: Sat, 31 Aug 2024 16:57:13 +0800 Subject: [PATCH] feat(ci): change to el10 --- .github/workflows/autobuild.yml | 23 +++++++------- .github/workflows/bootstrap.yml | 45 ++++++++++++++++++---------- .github/workflows/build.yml | 13 ++++---- .github/workflows/json-build.yml | 13 ++++---- .github/workflows/lint.yml | 8 ++--- .github/workflows/mg.sh | 4 +-- .github/workflows/update-comps.yml | 10 ++----- .github/workflows/update-nightly.yml | 12 ++++---- .github/workflows/update.yml | 13 ++++---- 9 files changed, 77 insertions(+), 64 deletions(-) diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 86af62f3ec..4ac687eb16 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -6,13 +6,13 @@ on: paths: - anda/** branches: - - f40 + - el10 pull_request: branches: - - f40 + - el10 merge_group: branches: - - f40 + - el10 workflow_dispatch: workflow_call: @@ -23,7 +23,7 @@ jobs: outputs: build_matrix: ${{ steps.generate_build_matrix.outputs.build_matrix }} container: - image: ghcr.io/terrapkg/builder:f40 + image: ghcr.io/terrapkg/builder:el10 options: --cap-add=SYS_ADMIN --privileged steps: - name: Set workspace as safe @@ -40,11 +40,11 @@ jobs: strategy: matrix: pkg: ${{ fromJson(needs.manifest.outputs.build_matrix) }} - version: ["40"] + version: ["10"] fail-fast: false runs-on: ${{ matrix.pkg.arch == 'aarch64' && 'ARM64' || matrix.pkg.labels['large'] && 'x86-64-lg' || 'ubuntu-latest' }} container: - image: ghcr.io/terrapkg/builder:f${{ matrix.version}} + image: ghcr.io/terrapkg/builder:el${{ matrix.version }} options: --cap-add=SYS_ADMIN --privileged steps: - name: Checkout @@ -63,15 +63,16 @@ jobs: - name: Include custom build template instead of package default run: | - cp -v mock-configs/terra.tpl /etc/mock/templates/terra.tpl + cp -v mock-configs/el${{ matrix.version }}.tpl /etc/mock/templates/ + cp -v mock-configs/epel${{ matrix.version }}.tpl /etc/mock/templates/ - name: Build with Andaman - run: anda build ${{ matrix.pkg.pkg }} --package rpm -c mock-configs/terra-${{ matrix.version }}-${{ matrix.pkg.arch }}.cfg + run: anda build ${{ matrix.pkg.pkg }} --package rpm -c mock-configs/terra-el${{ matrix.version }}+epel-${{ matrix.pkg.arch }}.cfg - 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 mock-configs/terra-${{ matrix.version }}-i386.cfg + run: anda build ${{ matrix.pkg.pkg }} --package rpm -c mock-configs/terra-el${{ matrix.version }}+epel-i386.cfg - name: Generating artifact name id: art @@ -94,7 +95,7 @@ jobs: subatomic-cli upload --prune \ --server https://subatomic.fyralabs.com \ --token ${{ secrets.SUBATOMIC_TOKEN }} \ - terra${{ matrix.version }} anda-build/rpm/rpms/* + terra-el${{ matrix.version }} anda-build/rpm/rpms/* - name: Upload source packages to subatomic if: github.event_name == 'push' @@ -102,7 +103,7 @@ jobs: subatomic-cli upload --prune \ --server https://subatomic.fyralabs.com \ --token ${{ secrets.SUBATOMIC_TOKEN }} \ - terra${{ matrix.version }}-source anda-build/rpm/srpm/* + terra-el${{ matrix.version }}-source anda-build/rpm/srpm/* - name: Notify Madoguchi (Success) if: success() && github.event_name == 'push' diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml index ab68a6cc77..fbdcaeba63 100644 --- a/.github/workflows/bootstrap.yml +++ b/.github/workflows/bootstrap.yml @@ -7,50 +7,65 @@ jobs: bootstrap: strategy: matrix: - version: ["40"] + version: ["10"] arch: ["x86_64", "aarch64"] fail-fast: true runs-on: ${{ matrix.arch == 'aarch64' && 'ARM64' || 'ubuntu-latest' }} container: - image: registry.fedoraproject.org/fedora-minimal:${{ matrix.version }} + image: docker.io/library/almalinux:${{ matrix.version }} options: --cap-add=SYS_ADMIN --privileged steps: + - uses: actions/checkout@v4 + with: + ref: el${{ matrix.version }} + fetch-depth: 1 + - name: Install repositories - run: dnf5 install -y --setopt=install_weak_deps=False mock curl wget git-core openssl-devel cargo podman fuse-overlayfs + run: | + dnf install -y 'dnf-command(config-manager)' + dnf config-manager --set-enabled crb + dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-${{ matrix.version }}.noarch.rpm + dnf install -y mock wget git-core openssl-devel cargo podman fuse-overlayfs rpm-build mock + dnf builddep -y anda/{terra/{mock-configs,srpm-macros},tools/buildsys/subatomic}/*.spec + + - name: Vendor Go + run: | + rm /usr/bin/go + curl -L https://go.dev/dl/go1.22.6.linux-${{ matrix.arch == 'aarch64' && 'arm64' || 'amd64' }}.tar.gz -o go.tar.gz + tar xf go.tar.gz go/bin/go + cp go/bin/go /usr/local/bin/ - name: Install Anda run: cargo install anda - - uses: actions/checkout@v4 - with: - ref: f${{ matrix.version }} - fetch-depth: 1 - name: Build terra-mock-configs run: | echo "PATH=$PATH:/github/home/.cargo/bin" >> $GITHUB_ENV export PATH=$PATH:/github/home/.cargo/bin git config --global --add safe.directory "$GITHUB_WORKSPACE" - anda build -c fedora-${{ matrix.version }}-${{ matrix.arch }} anda/terra/mock-configs/pkg -p rpm + anda build -c almalinux-${{ matrix.version }}-${{ matrix.arch }} anda/terra/mock-configs/pkg --rpm-builder=rpmbuild - name: Install terra-mock-configs - run: dnf5 install -y anda-build/rpm/rpms/terra-mock-configs*.rpm + run: dnf install -y anda-build/rpm/rpms/terra-mock-configs*.rpm - name: Build anda-srpm-macros - run: anda build -c terra-${{ matrix.version }}-${{ matrix.arch }} anda/terra/srpm-macros/pkg + run: anda build -c terra-el${{ matrix.version }}+epel-${{ matrix.arch }}.cfg anda/terra/srpm-macros/pkg --rpm-builder=rpmbuild - name: Build Subatomic - run: anda build -c terra-${{ matrix.version }}-${{ matrix.arch }} anda/tools/buildsys/subatomic/pkg + run: anda build -c terra-el${{ matrix.version }}+epel-${{ matrix.arch }}.cfg anda/tools/buildsys/subatomic/pkg --rpm-builder=rpmbuild - name: Install Subatomic - run: dnf5 install -y ./anda-build/rpm/rpms/subatomic-*.rpm + run: dnf install -y ./anda-build/rpm/rpms/subatomic-*.rpm + - name: Install Build Dependencies for Andaman + run: dnf builddep -y anda/tools/buildsys/anda/*.spec - name: Build Andaman - run: anda build -c terra-${{ matrix.version }}-${{ matrix.arch }} anda/tools/buildsys/anda/pkg + run: anda build -c terra-el${{ matrix.version }}+epel-${{ matrix.arch }} anda/tools/buildsys/anda/pkg --rpm-builder=rpmbuild - name: Upload packages to subatomic run: | subatomic-cli upload --prune \ --server https://subatomic.fyralabs.com \ --token ${{ secrets.SUBATOMIC_TOKEN }} \ - terra${{ matrix.version }} anda-build/rpm/rpms/* + terra-el${{ matrix.version }} anda-build/rpm/rpms/* - name: Upload source packages to subatomic if: github.event_name == 'push' @@ -58,4 +73,4 @@ jobs: subatomic-cli upload --prune \ --server https://subatomic.fyralabs.com \ --token ${{ secrets.SUBATOMIC_TOKEN }} \ - terra${{ matrix.version }}-source anda-build/rpm/srpm/* + terra-el${{ matrix.version }}-source anda-build/rpm/srpm/* diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 90998bb839..b029949278 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,12 +44,12 @@ jobs: strategy: matrix: pkg: ${{ fromJson(needs.parse.outputs.pkgs) }} - version: ["40"] + version: ["10"] arch: ${{ fromJson(needs.parse.outputs.arch) }} fail-fast: false runs-on: ${{ matrix.arch == 'aarch64' && 'ARM64' || needs.parse.outputs.builder && needs.parse.outputs.builder || 'ubuntu-latest' }} container: - image: ghcr.io/terrapkg/builder:f${{ matrix.version }} + image: ghcr.io/terrapkg/builder:el${{ matrix.version }} options: --cap-add=SYS_ADMIN --privileged steps: - name: Checkout @@ -68,10 +68,11 @@ jobs: - name: Include custom build template instead of package default run: | - cp -v mock-configs/terra.tpl /etc/mock/templates/terra.tpl + cp -v mock-configs/el${{ matrix.version }}.tpl /etc/mock/templates/ + cp -v mock-configs/epel${{ matrix.version }}.tpl /etc/mock/templates/ - name: Build with Andaman - run: anda build anda/${{ matrix.pkg }}pkg --package rpm -c mock-configs/terra-${{ matrix.version }}-${{ matrix.arch }}.cfg + run: anda build anda/${{ matrix.pkg }}pkg --package rpm -c mock-configs/terra-el${{ matrix.version }}+epel-${{ matrix.pkg.arch }}.cfg - name: Generating artifact name id: art @@ -93,14 +94,14 @@ jobs: subatomic-cli upload --prune \ --server https://subatomic.fyralabs.com \ --token ${{ secrets.SUBATOMIC_TOKEN }} \ - terra${{ matrix.version }} anda-build/rpm/rpms/* + terra-el${{ matrix.version }} anda-build/rpm/rpms/* - name: Upload source packages to subatomic run: | subatomic-cli upload --prune \ --server https://subatomic.fyralabs.com \ --token ${{ secrets.SUBATOMIC_TOKEN }} \ - terra${{ matrix.version }}-source anda-build/rpm/srpm/* + terra-el${{ matrix.version }}-source anda-build/rpm/srpm/* - name: Notify Madoguchi (Success) if: success() diff --git a/.github/workflows/json-build.yml b/.github/workflows/json-build.yml index 4992cea8ab..628141cb60 100644 --- a/.github/workflows/json-build.yml +++ b/.github/workflows/json-build.yml @@ -11,11 +11,11 @@ jobs: strategy: matrix: pkg: ${{ fromJson(inputs.packages) }} - version: ["40"] + version: ["10"] fail-fast: false runs-on: ${{ matrix.pkg.arch == 'aarch64' && 'ARM64' || 'ubuntu-latest' }} container: - image: ghcr.io/terrapkg/builder:f${{ matrix.version }} + image: ghcr.io/terrapkg/builder:el${{ matrix.version }} options: --cap-add=SYS_ADMIN --privileged steps: - name: Checkout @@ -34,10 +34,11 @@ jobs: - name: Include custom build template instead of package default run: | - cp -v mock-configs/terra.tpl /etc/mock/templates/terra.tpl + cp -v mock-configs/el${{ matrix.version }}.tpl /etc/mock/templates/ + cp -v mock-configs/epel${{ matrix.version }}.tpl /etc/mock/templates/ - name: Build with Andaman - run: anda build ${{ matrix.pkg.pkg }} --package rpm -c mock-configs/terra-${{ matrix.version }}-${{ matrix.pkg.arch }}.cfg + run: anda build ${{ matrix.pkg.pkg }} --package rpm -c mock-configs/terra-el${{ matrix.version }}+epel-${{ matrix.pkg.arch }}.cfg - name: Generating artifact name id: art @@ -59,7 +60,7 @@ jobs: subatomic-cli upload --prune \ --server https://subatomic.fyralabs.com \ --token ${{ secrets.SUBATOMIC_TOKEN }} \ - terra${{ matrix.version }} anda-build/rpm/rpms/* + terra-el${{ matrix.version }} anda-build/rpm/rpms/* - name: Upload source packages to subatomic if: github.event_name == 'push' @@ -67,7 +68,7 @@ jobs: subatomic-cli upload --prune \ --server https://subatomic.fyralabs.com \ --token ${{ secrets.SUBATOMIC_TOKEN }} \ - terra${{ matrix.version }}-source anda-build/rpm/srpm/* + terra-el${{ matrix.version }}-source anda-build/rpm/srpm/* - name: Notify Madoguchi (Success) if: success() diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b28bc3a602..ae7cc951be 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,18 +3,18 @@ name: Lint on: push: branches: - - f40 + - frawhide pull_request: branches: - - f40 + - frawhide merge_group: branches: - - f40 + - frawhide jobs: lint: runs-on: ubuntu-latest container: - image: ghcr.io/terrapkg/builder:f40 + image: ghcr.io/terrapkg/builder:frawhide steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/mg.sh b/.github/workflows/mg.sh index 64402b1718..3ade672a3e 100755 --- a/.github/workflows/mg.sh +++ b/.github/workflows/mg.sh @@ -7,7 +7,7 @@ export p="{\"id\":\"$5\",\"ver\":\"%v\",\"rel\":\"%r\",\"arch\":\"$4\",\"dirs\": if [[ $1 == false ]]; then d=${p/\%v/?} d=${d/\%r/?} - curl -H "Authorization: Bearer $6" https://madoguchi.fyralabs.com/ci/terra$3/builds/f -X PUT -H "Content-Type: application/json" -d $d --fail-with-body + curl -H "Authorization: Bearer $6" https://madoguchi.fyralabs.com/ci/terra-el$3/builds/f -X PUT -H "Content-Type: application/json" -d $d --fail-with-body exit 0 fi @@ -17,5 +17,5 @@ for f in anda-build/rpm/rpms/*; do r=$(lesspipe.sh $f | grep -E "Release\s*: " | sed "s@Release\s*: @@") d=${p/\%v/$v} d=${d/\%r/$r} - curl -H "Authorization: Bearer $6" https://madoguchi.fyralabs.com/ci5/terra$3/builds/$n -X PUT -H "Content-Type: application/json" -d $d --fail-with-body + curl -H "Authorization: Bearer $6" https://madoguchi.fyralabs.com/ci5/terra-el$3/builds/$n -X PUT -H "Content-Type: application/json" -d $d --fail-with-body done diff --git a/.github/workflows/update-comps.yml b/.github/workflows/update-comps.yml index 38612930be..5a45388391 100644 --- a/.github/workflows/update-comps.yml +++ b/.github/workflows/update-comps.yml @@ -3,10 +3,7 @@ name: Push comps updates on: push: branches: - - f40 - - f39 - - f38 - - f37 + - el10 paths: - comps.xml workflow_dispatch: @@ -15,14 +12,13 @@ jobs: update-comps: runs-on: ubuntu-latest container: - image: ghcr.io/terrapkg/builder:f40 + image: ghcr.io/terrapkg/builder:frawhide steps: - uses: actions/checkout@v4 - name: Push to subatomic run: | branch=${{ github.ref_name }} - ver=${branch/f/} subatomic-cli upload-comps \ --server https://subatomic.fyralabs.com \ --token ${{ secrets.SUBATOMIC_TOKEN }} \ - "terra${ver}" comps.xml + "terra${branch}" comps.xml diff --git a/.github/workflows/update-nightly.yml b/.github/workflows/update-nightly.yml index 615f0f35d9..a2429fd37f 100644 --- a/.github/workflows/update-nightly.yml +++ b/.github/workflows/update-nightly.yml @@ -8,7 +8,7 @@ jobs: autoupdate: runs-on: ubuntu-latest container: - image: ghcr.io/terrapkg/builder:f40 + image: ghcr.io/terrapkg/builder:frawhide options: --cap-add=SYS_ADMIN --privileged steps: - name: Checkout @@ -17,11 +17,12 @@ jobs: fetch-depth: 0 ssh-key: ${{ secrets.SSH_AUTHENTICATION_KEY }} - - name: Install SSH signing key + - name: Install SSH signing key & Set up git repository run: | mkdir -p ${{ runner.temp }} echo "${{ secrets.SSH_SIGNING_KEY }}" > ${{ runner.temp }}/signing_key chmod 0700 ${{ runner.temp }}/signing_key + git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: Run Nightly Update run: anda update -vv --filters nightly=1 @@ -30,7 +31,6 @@ jobs: - name: Save run: | - git config --global --add safe.directory "*" if [[ `git status --porcelain` ]]; then git config user.name "Raboneko" git config user.email "raboneko@fyralabs.com" @@ -46,8 +46,8 @@ jobs: git add * git commit -S -a -m "$msg" } - copy_over f37 || true - copy_over f38 || true - copy_over frawhide || true + copy_over f39 || true + copy_over f40 || true + copy_over f41 || true git push -u origin --all fi diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 0381bd64d5..b73c5b48cd 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -8,7 +8,7 @@ jobs: autoupdate: runs-on: ubuntu-latest container: - image: ghcr.io/terrapkg/builder:f40 + image: ghcr.io/terrapkg/builder:frawhide options: --cap-add=SYS_ADMIN --privileged steps: - name: Checkout @@ -17,21 +17,21 @@ jobs: fetch-depth: 0 ssh-key: ${{ secrets.SSH_AUTHENTICATION_KEY }} - - name: Install SSH signing key + - name: Install SSH signing key & Set up git repository run: | mkdir -p ${{ runner.temp }} echo "${{ secrets.SSH_SIGNING_KEY }}" > ${{ runner.temp }}/signing_key chmod 0700 ${{ runner.temp }}/signing_key + git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: Run Update - run: anda update -vv + run: anda update -vv --filters nightly=0 env: GITHUB_TOKEN: ${{ secrets.AUTOUPDATE_GH_TOKEN }} RUST_BACKTRACE: full - name: Save run: | - git config --global --add safe.directory "*" if [[ `git status --porcelain` ]]; then git config user.name "Raboneko" git config user.email "raboneko@fyralabs.com" @@ -48,8 +48,7 @@ jobs: git commit -S -a -m "$msg" } copy_over f39 || true - copy_over f37 || true - copy_over f38 || true - copy_over frawhide || true + copy_over f40 || true + copy_over f41 || true git push -u origin --all fi