2024-03-29 23:00:38 +01:00
|
|
|
name: Pages
|
2024-03-29 22:37:49 +01:00
|
|
|
|
|
|
|
on:
|
2024-03-29 23:01:04 +01:00
|
|
|
workflow_dispatch:
|
2024-03-29 22:59:43 +01:00
|
|
|
|
2024-03-29 22:37:49 +01:00
|
|
|
jobs:
|
2024-03-29 22:59:43 +01:00
|
|
|
# Lint changed templates.
|
|
|
|
xlint:
|
|
|
|
name: Lint templates
|
2024-03-29 22:37:49 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
2024-03-29 22:59:43 +01:00
|
|
|
container:
|
|
|
|
image: 'ghcr.io/void-linux/void-buildroot-musl:20231230R1'
|
|
|
|
env:
|
|
|
|
PATH: '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
|
|
|
|
LICENSE_LIST: common/travis/license.lst
|
2024-03-29 22:37:49 +01:00
|
|
|
|
2024-03-29 22:59:43 +01:00
|
|
|
steps:
|
|
|
|
- name: Prepare container
|
2024-03-29 22:37:49 +01:00
|
|
|
run: |
|
2024-03-29 22:59:43 +01:00
|
|
|
# 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
|
|
|
|
# Sync and upgrade once, assume error comes from xbps update
|
|
|
|
xbps-install -Syu || xbps-install -yu xbps
|
|
|
|
# Upgrade again (in case there was a xbps update)
|
|
|
|
xbps-install -yu
|
|
|
|
# install tools needed for lints
|
|
|
|
xbps-install -y grep curl git
|
|
|
|
- name: Clone and checkout
|
|
|
|
uses: classabbyamp/treeless-checkout-action@v1
|
|
|
|
- name: Create hostrepo and prepare masterdir
|
2024-03-29 22:37:49 +01:00
|
|
|
run: |
|
2024-03-29 22:59:43 +01:00
|
|
|
ln -s "$(pwd)" /hostrepo &&
|
|
|
|
common/travis/set_mirror.sh &&
|
|
|
|
common/travis/prepare.sh &&
|
|
|
|
common/travis/fetch-xtools.sh
|
|
|
|
- run: common/travis/changed_templates.sh
|
|
|
|
- name: Run lints
|
|
|
|
run: |
|
|
|
|
rv=0
|
|
|
|
common/travis/xlint.sh || rv=1
|
|
|
|
common/travis/verify-update-check.sh || rv=1
|
|
|
|
exit $rv
|
2024-03-29 22:37:49 +01:00
|
|
|
|
2024-03-29 22:59:43 +01:00
|
|
|
# Build changed packages.
|
|
|
|
build:
|
|
|
|
name: Build packages
|
2024-03-29 22:37:49 +01:00
|
|
|
runs-on: ubuntu-latest
|
2024-03-29 22:59:43 +01:00
|
|
|
if: "!contains(github.event.pull_request.title, '[ci skip]') && !contains(github.event.pull_request.body, '[ci skip]')"
|
|
|
|
|
2024-03-29 22:37:49 +01:00
|
|
|
container:
|
2024-03-29 22:59:43 +01:00
|
|
|
image: ghcr.io/void-linux/void-buildroot-${{ matrix.config.libc }}:20231230R1
|
|
|
|
options: --platform ${{ matrix.config.platform }}
|
|
|
|
env:
|
2024-03-30 14:12:48 +01:00
|
|
|
PATH: '/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
|
2024-03-29 22:59:43 +01:00
|
|
|
ARCH: '${{ matrix.config.arch }}'
|
|
|
|
BOOTSTRAP: '${{ matrix.config.host }}'
|
|
|
|
TEST: '${{ matrix.config.test }}'
|
|
|
|
HOSTREPO: /hostrepo
|
2024-03-29 22:37:49 +01:00
|
|
|
|
2024-03-29 22:59:43 +01:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
config:
|
|
|
|
- { arch: x86_64, host: x86_64, libc: glibc, platform: linux/amd64, test: 1 }
|
2024-03-30 08:26:21 +01:00
|
|
|
#- { arch: i686, host: i686, libc: glibc, platform: linux/386, test: 1 }
|
|
|
|
#- { 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: x86_64-musl, host: x86_64-musl, libc: musl, platform: linux/amd64, test: 1 }
|
|
|
|
#- { arch: armv6l-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 }
|
2024-03-29 22:37:49 +01:00
|
|
|
|
2024-03-29 22:59:43 +01:00
|
|
|
steps:
|
|
|
|
- name: Prepare container
|
2024-03-29 22:37:49 +01:00
|
|
|
run: |
|
2024-03-29 22:59:43 +01:00
|
|
|
# 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
|
|
|
|
# Sync and upgrade once, assume error comes from xbps update
|
|
|
|
xbps-install -Syu || xbps-install -yu xbps
|
|
|
|
# Upgrade again (in case there was a xbps update)
|
|
|
|
xbps-install -yu
|
2024-03-30 14:12:48 +01:00
|
|
|
xbps-install -y cmake python3 tar
|
2024-03-29 22:59:43 +01:00
|
|
|
|
|
|
|
- name: Clone and checkout
|
2024-03-30 14:12:48 +01:00
|
|
|
uses: classabbyamp/treeless-checkout-action@v1
|
2024-03-30 08:26:21 +01:00
|
|
|
|
2024-03-29 22:59:43 +01:00
|
|
|
- name: Create hostrepo and prepare masterdir
|
2024-03-29 22:37:49 +01:00
|
|
|
run: |
|
2024-03-29 22:59:43 +01:00
|
|
|
ln -s "$(pwd)" /hostrepo &&
|
|
|
|
common/travis/set_mirror.sh &&
|
|
|
|
common/travis/prepare.sh &&
|
|
|
|
common/travis/fetch-xtools.sh
|
|
|
|
- run: common/travis/changed_templates.sh
|
2024-03-29 22:37:49 +01:00
|
|
|
|
2024-03-30 14:09:59 +01:00
|
|
|
- name: Build packages
|
|
|
|
run: ./common/hypa/build.sh
|
|
|
|
|
|
|
|
- name: Sign packages
|
2024-03-29 22:59:43 +01:00
|
|
|
run: |
|
2024-03-30 14:09:59 +01:00
|
|
|
echo -n "${{ secrets.SIGN_PRIVATE_KEY }}" > private.pem
|
|
|
|
|
|
|
|
./common/hypa/sign.sh hostdir/binpkgs ${{ secrets.SIGN_USERNAME }} ${{ secrets.SIGN_EMAIL }}
|
2024-03-29 22:59:43 +01:00
|
|
|
|
2024-03-30 08:26:21 +01:00
|
|
|
- name: Build apindex
|
|
|
|
run: |
|
2024-03-30 14:12:48 +01:00
|
|
|
git clone https://github.com/libthinkpad/apindex.git
|
|
|
|
|
2024-03-30 08:26:21 +01:00
|
|
|
cd apindex
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake .. -DCMAKE_INSTALL_PREFIX=/tmp/apindex
|
|
|
|
make install
|
|
|
|
|
|
|
|
- name: Generate index.html
|
|
|
|
run: cd hostdir/binpkgs && /tmp/apindex/bin/apindex .
|
|
|
|
|
|
|
|
- name: Upload Pages artifact
|
|
|
|
uses: actions/upload-pages-artifact@v2
|
|
|
|
with:
|
|
|
|
path: hostdir/binpkgs
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
pages: write
|
|
|
|
id-token: write
|
|
|
|
environment:
|
|
|
|
name: github-pages
|
|
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
|
|
steps:
|
|
|
|
- name: Deploy to GitHub Pages
|
|
|
|
id: deployment
|
|
|
|
uses: actions/deploy-pages@v2
|