Skip to content

Commit 095b89a

Browse files
authored
Merge branch 'VUR' into check-anywhere
2 parents 23de04e + 26d1186 commit 095b89a

File tree

5,208 files changed

+193385
-199335
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

5,208 files changed

+193385
-199335
lines changed

.github/workflows/build.yaml

Lines changed: 41 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ jobs:
2121
runs-on: ubuntu-latest
2222

2323
container:
24-
image: 'ghcr.io/void-linux/void-buildroot-musl:20240526R1'
24+
image: 'ghcr.io/void-linux/void-musl-full:20250227R1'
2525
env:
26-
PATH: '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
2726
LICENSE_LIST: common/travis/license.lst
2827

2928
steps:
@@ -32,27 +31,28 @@ jobs:
3231
# switch to repo-ci mirror
3332
mkdir -p /etc/xbps.d && cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/
3433
sed -i 's|repo-default|repo-ci|g' /etc/xbps.d/*-repository-*.conf
35-
# Sync and upgrade once, assume error comes from xbps update
36-
xbps-install -Syu || xbps-install -yu xbps
37-
# Upgrade again (in case there was a xbps update)
38-
xbps-install -yu
39-
# install tools needed for lints
40-
xbps-install -y grep curl git
34+
# install dependencies
35+
xbps-install -Syu xbps && xbps-install -yu && xbps-install -y sudo bash grep curl git
36+
# create non-root user
37+
useradd -G xbuilder -M builder
38+
4139
- name: Clone and checkout
4240
uses: classabbyamp/treeless-checkout-action@v1
43-
- name: Create hostrepo and prepare masterdir
41+
42+
- name: Prepare masterdir
4443
run: |
45-
ln -s "$(pwd)" /hostrepo &&
46-
common/travis/set_mirror.sh &&
47-
common/travis/prepare.sh &&
44+
chown -R builder:builder . &&
45+
sudo -Eu builder common/travis/set_mirror.sh &&
4846
common/travis/fetch-xtools.sh
49-
- run: common/travis/changed_templates.sh
47+
48+
- name: Find changed templates
49+
run: sudo -Eu builder common/travis/changed_templates.sh
50+
5051
- name: Run lints
5152
run: |
52-
rv=0
53-
common/travis/xlint.sh || rv=1
54-
common/travis/verify-update-check.sh || rv=1
55-
exit $rv
53+
sudo -Eu builder common/travis/verify-update-check.sh || rv=1
54+
sudo -Eu builder common/travis/xlint.sh || rv=1
55+
exit "${rv:-0}"
5656
5757
# Build changed packages.
5858
build:
@@ -61,14 +61,14 @@ jobs:
6161
if: "!contains(github.event.pull_request.title, '[ci skip]') && !contains(github.event.pull_request.body, '[ci skip]')"
6262

6363
container:
64-
image: ghcr.io/void-linux/void-buildroot-${{ matrix.config.libc }}:20240526R1
65-
options: --platform ${{ matrix.config.platform }}
64+
image: ghcr.io/void-linux/void-${{ matrix.config.libc }}-full:20250227R1
65+
options: --platform ${{ matrix.config.platform }} --privileged
66+
volumes:
67+
- /dev:/dev
6668
env:
67-
PATH: '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
6869
ARCH: '${{ matrix.config.arch }}'
6970
BOOTSTRAP: '${{ matrix.config.host }}'
7071
TEST: '${{ matrix.config.test }}'
71-
HOSTREPO: /hostrepo
7272

7373
strategy:
7474
fail-fast: false
@@ -88,64 +88,44 @@ jobs:
8888
# switch to repo-ci mirror
8989
mkdir -p /etc/xbps.d && cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/
9090
sed -i 's|repo-default|repo-ci|g' /etc/xbps.d/*-repository-*.conf
91-
# Sync and upgrade once, assume error comes from xbps update
92-
xbps-install -Syu || xbps-install -yu xbps
93-
# Upgrade again (in case there was a xbps update)
94-
xbps-install -yu
91+
# install dependencies
92+
xbps-install -Syu xbps && xbps-install -yu && xbps-install -y sudo bash curl git
93+
# create non-root user
94+
useradd -G xbuilder -M builder
9595
9696
- name: Clone and checkout
97-
env:
98-
PATH: '/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
9997
uses: classabbyamp/treeless-checkout-action@v1
100-
- name: Create hostrepo and prepare masterdir
98+
99+
- name: Prepare masterdir
101100
run: |
102-
ln -s "$(pwd)" /hostrepo &&
103-
common/travis/set_mirror.sh &&
104-
common/travis/prepare.sh &&
101+
chown -R builder:builder . &&
102+
sudo -Eu builder common/travis/set_mirror.sh &&
103+
sudo -Eu builder common/travis/prepare.sh &&
105104
common/travis/fetch-xtools.sh
105+
106106
- name: Find changed templates
107-
env:
108-
PATH: '/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
109-
run: common/travis/changed_templates.sh
107+
run: sudo -Eu builder common/travis/changed_templates.sh
110108

111109
- name: Build and check packages
112-
run: |
113-
(
114-
here="$(pwd)"
115-
cd /
116-
"$here/common/travis/build.sh" "$BOOTSTRAP" "$ARCH" "$TEST"
117-
)
110+
run: sudo -Eu builder common/travis/build.sh "$BOOTSTRAP" "$ARCH" "$TEST"
118111

119112
- name: Show files
120-
run: |
121-
(
122-
here="$(pwd)"
123-
cd /
124-
"$here/common/travis/show_files.sh" "$BOOTSTRAP" "$ARCH"
125-
)
113+
run: sudo -Eu builder common/travis/show_files.sh "$BOOTSTRAP" "$ARCH"
126114

127115
- name: Compare to previous
128-
run: |
129-
(
130-
here="$(pwd)"
131-
cd /
132-
"$here/common/travis/xpkgdiff.sh" "$BOOTSTRAP" "$ARCH"
133-
)
116+
run: sudo -Eu builder common/travis/xpkgdiff.sh "$BOOTSTRAP" "$ARCH"
134117

135118
- name: Check file conflicts
136119
if: matrix.config.arch == 'x86_64' # the arch indexed in xlocate
137-
env:
138-
PATH: '/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
139120
run: |
140121
if [ -s /tmp/templates ]; then
141-
xlocate -S &&
142-
common/scripts/lint-conflicts $HOME/hostdir/binpkgs
122+
export XDG_CACHE_HOME="$PWD/.cache"
123+
sudo -Eu builder xlocate -S &&
124+
sudo -Eu builder common/scripts/lint-conflicts
143125
fi
144126
145127
- name: Verify repository state
146128
run: |
147-
(
148-
here="$(pwd)"
149-
cd /
150-
"$here/common/travis/check-install.sh" "$BOOTSTRAP" "$ARCH"
151-
)
129+
mkdir -p /check-install &&
130+
chown builder:builder /check-install &&
131+
sudo -Eu builder common/travis/check-install.sh "$BOOTSTRAP" "$ARCH"

.github/workflows/container.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686

8787
- name: Build and push images
8888
id: build_and_push
89-
uses: docker/bake-action@v3
89+
uses: docker/bake-action@v5
9090
with:
9191
push: ${{ github.event_name != 'pull_request' }}
9292
targets: void-buildroot-${{ matrix.libc }}

.github/workflows/cycles.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: 'Cycle Check'
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 18 * * *'
7+
8+
jobs:
9+
cycles:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
issues: write
13+
container:
14+
image: 'ghcr.io/void-linux/void-musl-full:20250227R1'
15+
steps:
16+
- name: Prepare container
17+
run: |
18+
# switch to repo-ci mirror
19+
mkdir -p /etc/xbps.d && cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/
20+
sed -i 's|repo-default|repo-ci|g' /etc/xbps.d/*-repository-*.conf
21+
# install dependencies
22+
xbps-install -Syu xbps && xbps-install -yu && xbps-install -y sudo bash grep git python3-networkx github-cli
23+
# create non-root user
24+
useradd -G xbuilder -M builder
25+
26+
- name: Clone and checkout
27+
uses: classabbyamp/treeless-checkout-action@v1
28+
29+
- name: Prepare masterdir
30+
run: |
31+
chown -R builder:builder . &&
32+
sudo -Eu builder common/travis/set_mirror.sh
33+
34+
- name: Find cycles and open issues
35+
run: |
36+
sudo -Eu builder common/scripts/xbps-cycles.py | tee cycles
37+
grep 'Cycle:' cycles | while read -r line; do
38+
if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
39+
printf "Issue on '%s' already exists.\n" "$line"
40+
else
41+
gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
42+
fi
43+
done
44+
env:
45+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}

.github/workflows/cycles.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Deployment
2+
3+
on:
4+
workflow_dispatch:
5+
# Inputs the workflow accepts.
6+
inputs:
7+
repo:
8+
description: 'Choose repo'
9+
required: true
10+
type: choice
11+
options:
12+
$REPO
13+
branch:
14+
description: 'Choose branch'
15+
required: true
16+
type: choice
17+
options:
18+
$BRANCH
19+
upstream_repo:
20+
description: 'Choose upstream repo'
21+
required: true
22+
type: choice
23+
options:
24+
$UPSTREAM_REPO
25+
upstream_branch:
26+
description: 'Choose upstream branch'
27+
required: true
28+
type: choice
29+
options:
30+
$UPSTREAM_BRANCH
31+
sync_test_mode: # Adds a boolean option that appears during manual workflow run for easy test mode config
32+
description: 'Fork Sync Test Mode'
33+
type: boolean
34+
default: false
35+
permissions:
36+
contents: write
37+
actions: write
38+
39+
jobs:
40+
sync_latest_from_upstream:
41+
runs-on: ubuntu-latest
42+
name: " 🌍 Rebasing ${{ inputs.repo }} branch ${{ inputs.branch }} on ${{ inputs.upstream_repo }} branch ${{ inputs.upstream_branch }}"
43+
44+
steps:
45+
# REQUIRED step
46+
# Step 1: run a standard checkout action, provided by github
47+
- name: Checkout target repo
48+
uses: actions/checkout@v4
49+
with:
50+
repository: ${{ inputs.repo }}
51+
# optional: set the branch to checkout,
52+
# sync action checks out your 'target_sync_branch' anyway
53+
ref: ${{ inputs.branch }}
54+
# REQUIRED if your upstream repo is private (see wiki)
55+
persist-credentials: false
56+
57+
# REQUIRED step
58+
# Step 2: run the sync action
59+
- name: Sync upstream changes
60+
id: sync
61+
uses: aormsby/Fork-Sync-With-Upstream-action@v3
62+
with:
63+
target_sync_branch: ${{ inputs.branch }}
64+
# REQUIRED 'target_repo_token' exactly like this!
65+
target_repo_token: ${{ secrets.TOKEN }}
66+
upstream_sync_branch: ${{ inputs.upstream_branch }}
67+
upstream_sync_repo: ${{ inputs.upstream_repo }}
68+
#upstream_repo_access_token: ${{ secrets.UPSTREAM_REPO_SECRET }}
69+
70+
# Set test_mode true during manual dispatch to run tests instead of the true action!!
71+
test_mode: ${{ inputs.sync_test_mode }}
72+
73+
# Step 3: Display a sample message based on the sync output var 'has_new_commits'
74+
- name: New commits found
75+
if: steps.sync.outputs.has_new_commits == 'true'
76+
run: echo "New commits were found to sync."
77+
78+
- name: No new commits
79+
if: steps.sync.outputs.has_new_commits == 'false'
80+
run: echo "There were no new commits."
81+
82+
- name: Show value of 'has_new_commits'
83+
run: echo ${{ steps.sync.outputs.has_new_commits }}

0 commit comments

Comments
 (0)