docs: Fix list of replaced and conflicting packages #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-License-Identifier: CC0-1.0 | |
# | |
# SPDX-FileContributor: Adrian "asie" Siekierka, 2024 | |
# SPDX-FileContributor: Antonio Niño Díaz, 2024 | |
name: Packages | |
on: | |
push: | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
workflow_dispatch: | |
repository_dispatch: | |
types: [run_build] | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
packages: write | |
jobs: | |
build_linux: | |
name: Build Pacman packages (Linux) | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [x86_64, aarch64] | |
steps: | |
- name: Clone project | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Alpine Linux | |
uses: jirutka/setup-alpine@v1 | |
with: | |
branch: v3.20 | |
arch: ${{ matrix.arch }} | |
packages: > | |
bash | |
build-base | |
coreutils | |
curl | |
fakeroot | |
git | |
libarchive-tools | |
patchelf | |
sed | |
sudo | |
xz | |
zstd | |
# This folder needs to be created as root, but regular users need to be | |
# able to modify it. | |
- name: Create /opt/wonderful folder | |
shell: alpine.sh --root {0} | |
run: | | |
sudo sh -c "mkdir /opt/wonderful && chown -R runner /opt/wonderful" | |
- name: Install Wonderful | |
shell: alpine.sh {0} | |
run: | | |
cd /opt/wonderful | |
curl https://wonderful.asie.pl/bootstrap/wf-bootstrap-${{ matrix.arch }}.tar.gz | tar xzvf - | |
- name: Install prerequisites (Wonderful) | |
shell: alpine.sh {0} | |
run: | | |
export PATH=/opt/wonderful/bin:$PATH | |
wf-pacman -Syu --noconfirm | |
wf-pacman -Syu --noconfirm \ | |
wonderful-base \ | |
runtime-musl-dev \ | |
toolchain-gcc-arm-none-eabi \ | |
if [ "${{ matrix.arch }}" == "x86_64" ]; then | |
wf-pacman -Syu --noconfirm \ | |
toolchain-llvm-teak-llvm \ | |
toolchain-gcc-arm-none-eabi-libpng16 \ | |
toolchain-gcc-arm-none-eabi-zlib | |
fi | |
- name: Build packages | |
shell: alpine.sh {0} | |
run: | | |
bash build.sh blocksds-toolchain | |
bash build.sh blocksds-ptexconv | |
# Only build architecture-agnostic packages once | |
if [ "${{ matrix.arch }}" == "x86_64" ]; then | |
# Install the SDK so that we can build other libs | |
bash install.sh blocksds-toolchain | |
export BLOCKSDS=/opt/wonderful/thirdparty/blocksds/core/ | |
export BLOCKSDSEXT=/opt/wonderful/thirdparty/blocksds/external/ | |
bash build.sh blocksds-dserial | |
bash install.sh blocksds-dserial # Required by blocksds-dsmi | |
bash build.sh blocksds-docs | |
bash build.sh blocksds-dsmi | |
bash build.sh blocksds-gbajpeg | |
bash build.sh blocksds-libdsf | |
bash build.sh blocksds-libwoopsi | |
bash build.sh blocksds-nflib | |
bash build.sh blocksds-nitroengine | |
bash build.sh blocksds-ulibrary | |
fi | |
mkdir -p out | |
mv */*.pkg.tar.xz out | |
echo "Artifacts:" | |
echo "==========" | |
ls out | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: packages_linux_${{ matrix.arch }} | |
path: out | |
compression-level: 0 | |
if-no-files-found: error | |
# https://wonderful.asie.pl/wiki/doku.php?id=getting_started | |
build_windows: | |
name: Build Pacman packages (Windows) | |
runs-on: windows-latest | |
continue-on-error: false | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Setup MSYS2 | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ucrt64 | |
update: true | |
install: | | |
base-devel | |
gcc | |
git | |
libarchive | |
libtool | |
lld | |
make | |
mingw-w64-ucrt-x86_64-ca-certificates | |
mingw-w64-ucrt-x86_64-iconv | |
mingw-w64-ucrt-x86_64-python | |
mingw-w64-ucrt-x86_64-python-poetry | |
mingw-w64-ucrt-x86_64-toolchain | |
wget | |
- name: Install Wonderful | |
shell: msys2 {0} | |
run: | | |
mkdir /opt/wonderful | |
cd /opt/wonderful | |
wget https://wonderful.asie.pl/bootstrap/wf-bootstrap-windows-x86_64.tar.gz | |
tar -xzvf wf-bootstrap-windows-x86_64.tar.gz | |
- name: Install prerequisites (Wonderful) | |
shell: msys2 {0} | |
run: | | |
export PATH=/opt/wonderful/bin:$PATH | |
export WONDERFUL_TOOLCHAIN=/opt/wonderful/ | |
wf-pacman -Syu --noconfirm | |
wf-pacman -Syu --noconfirm \ | |
wonderful-base \ | |
wf-pacman \ | |
runtime-gcc-libs \ | |
toolchain-gcc-arm-none-eabi | |
- name: Set Git line endings to LF | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.eol lf | |
- name: Clone project | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Build packages | |
shell: msys2 {0} | |
run: | | |
bash build.sh blocksds-toolchain | |
bash build.sh blocksds-ptexconv | |
mkdir -p out | |
mv */*.pkg.tar.xz out | |
echo "Artifacts:" | |
echo "==========" | |
ls out | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: packages_windows_x86_64 | |
path: out | |
compression-level: 0 | |
if-no-files-found: error | |
generate_website: | |
name: Generate website | |
needs: [build_linux, build_windows] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Clone project | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Alpine Linux | |
uses: jirutka/setup-alpine@v1 | |
with: | |
branch: v3.20 | |
arch: x86_64 | |
packages: > | |
bash | |
build-base | |
coreutils | |
curl | |
envsubst | |
fakeroot | |
git | |
libarchive-tools | |
patchelf | |
sed | |
sudo | |
xz | |
zstd | |
# This folder needs to be created as root, but regular users need to be | |
# able to modify it. | |
- name: Create /opt/wonderful folder | |
shell: alpine.sh --root {0} | |
run: | | |
sudo sh -c "mkdir /opt/wonderful && chown -R runner /opt/wonderful" | |
- name: Install Wonderful | |
shell: alpine.sh {0} | |
run: | | |
cd /opt/wonderful | |
curl https://wonderful.asie.pl/bootstrap/wf-bootstrap-x86_64.tar.gz | tar xzvf - | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
- name: Create repo files | |
shell: alpine.sh {0} | |
run: | | |
tree | |
export PATH=/opt/wonderful/bin:$PATH | |
export WONDERFUL_TOOLCHAIN=/opt/wonderful/ | |
mkdir -p packages/rolling/linux/x86_64/ | |
mkdir -p packages/rolling/linux/aarch64/ | |
mkdir -p packages/rolling/windows/x86_64/ | |
# The architecture-agnostic and OS-agnostic packages are only built | |
# in the Linux x86_64 build, so they need to be copied to the other | |
# architectures and OSes. | |
cp packages_linux_x86_64/*.pkg.tar.xz packages/rolling/linux/x86_64/ | |
cp packages_linux_x86_64/*any.pkg.tar.xz packages/rolling/linux/aarch64/ | |
cp packages_linux_aarch64/*.pkg.tar.xz packages/rolling/linux/aarch64/ | |
cp packages_linux_x86_64/*any.pkg.tar.xz packages/rolling/windows/x86_64/ | |
cp packages_windows_x86_64/*.pkg.tar.xz packages/rolling/windows/x86_64/ | |
tree | |
cd packages/rolling/linux/x86_64/ | |
wf-repo-add blocksds.db.tar.xz *.pkg.tar.xz | |
# Remove symlinks for GitHub pages | |
rm blocksds.db | |
rm blocksds.files | |
cp blocksds.db.tar.xz blocksds.db | |
cp blocksds.files.tar.xz blocksds.files | |
cd ../../../.. | |
cd packages/rolling/linux/aarch64/ | |
wf-repo-add blocksds.db.tar.xz *.pkg.tar.xz | |
# Remove symlinks for GitHub pages | |
rm blocksds.db | |
rm blocksds.files | |
cp blocksds.db.tar.xz blocksds.db | |
cp blocksds.files.tar.xz blocksds.files | |
cd ../../../.. | |
cd packages/rolling/windows/x86_64/ | |
wf-repo-add blocksds.db.tar.xz *.pkg.tar.xz | |
# Remove symlinks for GitHub pages | |
rm blocksds.db | |
rm blocksds.files | |
cp blocksds.db.tar.xz blocksds.db | |
cp blocksds.files.tar.xz blocksds.files | |
cd ../../../.. | |
# Generate basic index files | |
bash gen_index.sh packages/rolling/linux/x86_64/ true | |
bash gen_index.sh packages/rolling/linux/aarch64/ true | |
bash gen_index.sh packages/rolling/windows/x86_64/ true | |
bash gen_index.sh packages/rolling/linux/ true | |
bash gen_index.sh packages/rolling/windows/ true | |
bash gen_index.sh packages/rolling/ true | |
bash gen_index.sh packages/ false | |
# Create tarball with everything to upload to GitHub pages | |
cd packages | |
tar -cvf ../repo.tar ./* | |
- name: Upload repo artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: github-pages | |
path: repo.tar | |
if-no-files-found: error | |
publish_repo: | |
name: Publish website with GitHub pages | |
if: contains(github.ref,'refs/heads/master') | |
needs: [generate_website] | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |