Compare commits

...

18 commits

Author SHA1 Message Date
85401c22ab
Remove workflow events used for testing
Some checks are pending
build / Check package changes (push) Waiting to run
build / Build packages (push) Blocked by required conditions
build / Deploy repository (push) Blocked by required conditions
2025-06-24 12:06:30 +02:00
2afd3f986c
Remove leftover packages before creating repo website 2025-06-24 12:06:29 +02:00
marty-oehme
6a30e8f64c
Update phiresky/ripgrep-all to v0.10.9 (#6)
* Update dependency phiresky/ripgrep-all to v0.10.9

* Update ripgrep-all checksum

---------

Co-authored-by: Renovate Bot <renovate@whitesourcesoftware.com>
2025-06-24 10:26:54 +02:00
bf07c11fb4
Fix deployment branch checking 2025-06-24 10:17:50 +02:00
b198bcab2e
Fix build workflow CHANGED env var 2025-06-24 10:07:08 +02:00
963ee15eeb
Distinguish between package and checksum updates 2025-06-24 10:02:40 +02:00
936aa8fbbc
Commit deployed package changes 2025-06-24 09:57:12 +02:00
e5d8f52668
Switch to latest void containers 2025-06-24 09:57:12 +02:00
7be7e5029a
Only run deployment if called from PR 2025-06-24 09:57:11 +02:00
c7ae80f33a
Improve build artifact naming 2025-06-24 09:57:11 +02:00
b1277a2089
Fix checking out correct ref in build workflow 2025-06-23 23:06:04 +02:00
0cbf4b6b65
Fix receiving correct changed pkg env var to xgensum 2025-06-23 22:51:00 +02:00
08f0d251ef
Add pwd as safe git directory 2025-06-23 22:50:57 +02:00
3dd576935b
Fetch current github ref 2025-06-23 22:37:00 +02:00
512874ffc4
Use different working directories 2025-06-23 22:36:36 +02:00
5978dfe2ef
Set new run conditions for building 2025-06-23 22:24:26 +02:00
d91417d4ea
Add checksum workflow for PRs 2025-06-23 22:24:26 +02:00
a5f05da58f
Automatically checksum renovated packages 2025-06-23 22:20:46 +02:00
4 changed files with 128 additions and 33 deletions

View file

@ -1,25 +1,36 @@
name: build name: build
on: on:
# TODO: Enable once we have conditional build logic built # a package changed (usually in PR)
# pull_request: workflow_run:
# paths: workflows: [ChecksumUpdate]
# - 'srcpkgs/**' types: [completed]
# we are integrating updates
push: push:
paths: paths:
- 'srcpkgs/**' - "srcpkgs/**"
branches:
- main
jobs: jobs:
changedpkgs: changedpkgs:
name: Check package changes name: Check package changes
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: "!contains(github.event.pull_request.title, '[ci skip]') && !contains(github.event.pull_request.body, '[ci skip]')" if: "${{ github.event.workflow_run.conclusion == 'success' }} && !contains(github.event.pull_request.title, '[ci skip]') && !contains(github.event.pull_request.body, '[ci skip]')"
outputs: outputs:
changed: ${{ steps.grabchanged.outputs.changed }} changed: ${{ steps.grabchanged.outputs.changed }}
steps: steps:
- name: checkout local templates from prev workflow
if: "${{ github.event_name == 'workflow_run' }}"
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.workflow_run.head_branch }}
- name: checkout local templates - name: checkout local templates
if: "${{ github.event_name != 'workflow_run' }}"
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
@ -36,14 +47,20 @@ jobs:
build: build:
name: Build packages name: Build packages
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [ changedpkgs ] needs: [changedpkgs]
if: "needs.changedpkgs.outputs.changed != '' && !contains(github.event.pull_request.title, '[ci skip]') && !contains(github.event.pull_request.body, '[ci skip]')" if: "needs.changedpkgs.outputs.changed != '' && !contains(github.event.pull_request.title, '[ci skip]') && !contains(github.event.pull_request.body, '[ci skip]')"
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
config: config:
- { arch: x86_64, host: x86_64, libc: glibc, platform: linux/amd64, test: 1 } - {
arch: x86_64,
host: x86_64,
libc: glibc,
platform: linux/amd64,
test: 1,
}
# - { arch: i686, host: i686, libc: glibc, platform: linux/386, test: 1 } # - { arch: i686, host: i686, libc: glibc, platform: linux/386, test: 1 }
# - { arch: aarch64, host: x86_64, libc: glibc, platform: linux/amd64, test: 0 } # - { arch: aarch64, host: x86_64, libc: glibc, platform: linux/amd64, test: 0 }
# - { arch: armv7l, host: x86_64, libc: glibc, platform: linux/amd64, test: 0 } # - { arch: armv7l, host: x86_64, libc: glibc, platform: linux/amd64, test: 0 }
@ -52,14 +69,14 @@ jobs:
# - { arch: aarch64-musl, host: x86_64-musl, libc: musl, platform: linux/amd64, test: 0 } # - { arch: aarch64-musl, host: x86_64-musl, libc: musl, platform: linux/amd64, test: 0 }
container: container:
image: ghcr.io/void-linux/void-${{ matrix.config.libc }}-full:20250227R1 image: ghcr.io/void-linux/void-${{ matrix.config.libc }}-full:latest
options: --platform ${{ matrix.config.platform }} --privileged options: --platform ${{ matrix.config.platform }} --privileged
volumes: volumes:
- /dev:/dev - /dev:/dev
env: env:
ARCH: '${{ matrix.config.arch }}' ARCH: "${{ matrix.config.arch }}"
BOOTSTRAP: '${{ matrix.config.host }}' BOOTSTRAP: "${{ matrix.config.host }}"
TEST: '${{ matrix.config.test }}' TEST: "${{ matrix.config.test }}"
steps: steps:
- name: Prepare container - name: Prepare container
@ -99,7 +116,7 @@ jobs:
- name: Find changed templates - name: Find changed templates
env: env:
CHANGED: ${{ needs.changedpkgs.outputs.changed }} CHANGED: ${{ needs.changedpkgs.outputs.changed }}
run: sudo -Eu builder echo "$CHANGED" | sed 's/ /\n/g' > /tmp/templates run: sudo -Eu builder echo "${{ env.CHANGED }}" | sed 's/ /\n/g' > /tmp/templates
- name: Build and check packages - name: Build and check packages
run: sudo -Eu builder common/travis/build.sh "$BOOTSTRAP" "$ARCH" "$TEST" run: sudo -Eu builder common/travis/build.sh "$BOOTSTRAP" "$ARCH" "$TEST"
@ -109,8 +126,10 @@ jobs:
- name: Archive xbps artifacts - name: Archive xbps artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
env:
CHANGED: ${{ needs.changedpkgs.outputs.changed }}
with: with:
name: binaries-${{ matrix.config.arch }}-${{ matrix.config.libc }} name: binaries-${{ env.CHANGED }}-${{ matrix.config.arch }}-${{ matrix.config.libc }}.xbps
path: | path: |
hostdir/binpkgs/*.xbps hostdir/binpkgs/*.xbps
@ -135,14 +154,14 @@ jobs:
deploy: deploy:
name: Deploy repository name: Deploy repository
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [ build ] needs: [build]
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-deployment group: ${{ github.workflow }}-${{ github.ref }}-deployment
cancel-in-progress: false cancel-in-progress: false
if: "github.ref == 'refs/heads/main' && !contains(github.event.pull_request.title, '[ci skip]') && !contains(github.event.pull_request.body, '[ci skip]')" if: "github.ref == 'refs/heads/main' && github.event_name != 'workflow_run' && !contains(github.event.pull_request.title, '[ci skip]') && !contains(github.event.pull_request.body, '[ci skip]')"
container: container:
image: ghcr.io/void-linux/void-glibc-full:20250227R1 image: ghcr.io/void-linux/void-glibc-full:latest
options: --privileged options: --privileged
steps: steps:
@ -182,6 +201,13 @@ jobs:
run: | run: |
xbps-rindex --add $PWD/*.xbps xbps-rindex --add $PWD/*.xbps
xbps-rindex --clean $PWD xbps-rindex --clean $PWD
xbps-rindex --remove $PWD
- name: Commit new repo state
uses: stefanzweifel/git-auto-commit-action@v6
with:
file_pattern: "*.xbps *.xbps.sig2"
commit_message: "Update package repo"
# - name: checksum # - name: checksum
# run: | # run: |

79
.github/workflows/checksum.yaml vendored Normal file
View file

@ -0,0 +1,79 @@
name: ChecksumUpdate
on:
pull_request:
paths:
- "srcpkgs/**"
types:
- opened
- synchronize
branches:
- main
jobs:
checksum:
runs-on: ubuntu-latest
container:
image: ghcr.io/void-linux/void-glibc-full:latest
options: --platform linux/amd64 --privileged
volumes:
- /dev:/dev
env:
ARCH: x86_64
BOOTSTRAP: x86_64
TEST: 1
steps:
- name: Prepare container
run: |
# switch to repo-ci mirror
mkdir -p /etc/xbps.d && cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/
sed -i 's|repo-default|repo-ci|g' /etc/xbps.d/*-repository-*.conf
# install dependencies
xbps-install -Suy xbps && xbps-install -Suy sudo xtools bash git
# create non-root user
useradd -G xbuilder -M builder
- name: checkout local templates
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
- name: remember changed package
run: |
git config --global --add safe.directory $PWD
echo "CHANGED_PKG=$(git diff --name-only origin/main origin/${GITHUB_HEAD_REF} "srcpkgs/*/template" | head -1 | cut -d/ -f2)" >> $GITHUB_ENV
echo "CHANGED: ${{ env.CHANGED_PKG }}"
- name: checkout upstream templates
uses: actions/checkout@v4
with:
repository: void-linux/void-packages
ref: master
fetch-depth: 1
path: upstream
- name: prep masterdir
working-directory: upstream
run: |
chown -R builder:builder . &&
sudo -Eu builder common/travis/set_mirror.sh &&
sudo -Eu builder common/travis/prepare.sh
- name: copy to upstream
run: cp -rv srcpkgs/* upstream/srcpkgs
- name: generate checksum
working-directory: upstream
run: "sudo -Eu builder xgensum -f -i ${{ env.CHANGED_PKG }}"
- name: receive relevant copy from upstream
run: |
cp -r "upstream/srcpkgs/${{ env.CHANGED_PKG }}" srcpkgs
- name: commit new checksum
uses: stefanzweifel/git-auto-commit-action@v6
with:
file_pattern: "srcpkgs/${{ env.CHANGED_PKG }}/template"
commit_message: "Update ${{ env.CHANGED_PKG }} checksum"

View file

@ -1,15 +1,12 @@
name: renovate name: Check package updates
on: on:
schedule: schedule:
- cron: '0 * * * *' - cron: "0 * * * *"
push:
paths:
- '.github/**' # TODO: remove after debugging
env: env:
LOG_LEVEL: 'debug' LOG_LEVEL: "info"
RENOVATE_AUTODISCOVER: true RENOVATE_AUTODISCOVER: true
RENOVATE_AUTODISCOVER_FILTER: '${{ github.repository }}' RENOVATE_AUTODISCOVER_FILTER: "${{ github.repository }}"
RENOVATE_PLATFORM: github RENOVATE_PLATFORM: github
# RENOVATE_PLATFORM_COMMIT: true # RENOVATE_PLATFORM_COMMIT: true
# RENOVATE_BOT_NAME: 'breq' # RENOVATE_BOT_NAME: 'breq'
@ -26,10 +23,3 @@ jobs:
with: with:
configurationFile: .github/renovate.json configurationFile: .github/renovate.json
token: ${{ secrets.RENOVATE_TOKEN }} token: ${{ secrets.RENOVATE_TOKEN }}
- name: Find updated package
run: |
#!/usr/bin/env bash
set -euxo pipefail
echo "pkgbuild=$(git diff --name-only origin/main origin/${GITHUB_HEAD_REF} "*template" | head -1 | xargs dirname)" >> $GITHUB_ENV

View file

@ -1,6 +1,6 @@
# Template file for 'ripgrep-all' # Template file for 'ripgrep-all'
pkgname=ripgrep-all pkgname=ripgrep-all
version=0.10.6 # renovate: datasource=github-tags depName=phiresky/ripgrep-all version=0.10.9 # renovate: datasource=github-tags depName=phiresky/ripgrep-all
revision=2 revision=2
build_style=cargo build_style=cargo
hostmakedepends="rust pkg-config" hostmakedepends="rust pkg-config"
@ -13,7 +13,7 @@ maintainer="Marty Oehme <contact@martyoeh.me>"
license="AGPL-3.0-only" license="AGPL-3.0-only"
homepage="https://github.com/phiresky/ripgrep-all" homepage="https://github.com/phiresky/ripgrep-all"
distfiles="${homepage}/archive/v${version}.tar.gz" distfiles="${homepage}/archive/v${version}.tar.gz"
checksum=06cd619ad6638be206266a77fdf11034dc2dc15d97b3a057b0d6280a17334680 checksum=a5b3150940dcddd35a26e9de398f11a563d0466a335e5450ceb7ff369e9fef45
post_install() { post_install() {
vdoc README.md vdoc README.md