mirror of
https://github.com/wofferl/proxmox-backup-arm64
synced 2025-12-06 00:13:41 +00:00
102
.github/workflows/buildtest.yml
vendored
102
.github/workflows/buildtest.yml
vendored
@@ -17,9 +17,10 @@ on:
|
|||||||
- 4.x
|
- 4.x
|
||||||
arch:
|
arch:
|
||||||
type: choice
|
type: choice
|
||||||
description: Arch
|
description: Target Arch
|
||||||
options:
|
options:
|
||||||
- arm64
|
- arm64-native
|
||||||
|
- arm64-cross
|
||||||
- amd64
|
- amd64
|
||||||
baseimage:
|
baseimage:
|
||||||
type: choice
|
type: choice
|
||||||
@@ -27,11 +28,14 @@ on:
|
|||||||
options:
|
options:
|
||||||
- debian:trixie-slim
|
- debian:trixie-slim
|
||||||
- debian:bookworm-slim
|
- debian:bookworm-slim
|
||||||
|
- ubuntu:noble
|
||||||
- ubuntu:jammy
|
- ubuntu:jammy
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-arm64-native:
|
||||||
runs-on: ubuntu-22.04
|
if: ${{ github.event.inputs.arch == 'arm64-native' }}
|
||||||
|
runs-on: ubuntu-24.04-arm
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Free up disk space
|
- name: Free up disk space
|
||||||
run: |
|
run: |
|
||||||
@@ -40,7 +44,6 @@ jobs:
|
|||||||
sudo rm -rf /usr/local/lib/node_modules
|
sudo rm -rf /usr/local/lib/node_modules
|
||||||
sudo rm -rf /usr/share/dotnet
|
sudo rm -rf /usr/share/dotnet
|
||||||
sudo rm -rf /usr/share/swift
|
sudo rm -rf /usr/share/swift
|
||||||
df -h
|
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -53,23 +56,80 @@ jobs:
|
|||||||
|
|
||||||
- name: Build packages
|
- name: Build packages
|
||||||
run: |
|
run: |
|
||||||
[ "${{ github.event.inputs.package }}" = "client" ] && package="client"
|
options=""
|
||||||
if [ "${{ github.event.inputs.arch }}" = "arm64" ]; then
|
[ "${{ github.event.inputs.package }}" = "client" ] && options="client"
|
||||||
if [ "${RUNNER_DEBUG}" = "1" ]; then
|
[ "${RUNNER_DEBUG}" = "1" ] && options=$options" debug"
|
||||||
docker buildx build -o packages --build-arg buildoptions="cross github debug ${package}" --build-arg baseimage=${{ github.event.inputs.baseimage }} --platform linux/amd64 -f .github/Dockerfile.crosscompile-arm64 .
|
docker buildx build -o packages --build-arg buildoptions="github ${package}" --build-arg baseimage=${{ github.event.inputs.baseimage }} --platform linux/arm64 .
|
||||||
else
|
|
||||||
docker buildx build -o packages --build-arg buildoptions="cross github ${package}" --build-arg baseimage=${{ github.event.inputs.baseimage }} --platform linux/amd64 -f .github/Dockerfile.crosscompile-arm64 .
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if [ "${RUNNER_DEBUG}" = "1" ]; then
|
|
||||||
docker buildx build -o packages --build-arg buildoptions="github debug ${package}" --build-arg baseimage=${{ github.event.inputs.baseimage }} --platform linux/amd64 .
|
|
||||||
else
|
|
||||||
docker buildx build -o packages --build-arg buildoptions="github ${package}" --build-arg baseimage=${{ github.event.inputs.baseimage }} --platform linux/amd64 .
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
echo "DEB_VERSION=$(dpkg --info packages/proxmox-backup-server_*.deb | sed -n '/Version/ s/[^:]\+: //p')" >> $GITHUB_ENV
|
echo "DEB_VERSION=$(dpkg --info packages/proxmox-backup-server_*.deb | sed -n '/Version/ s/[^:]\+: //p')" >> $GITHUB_ENV
|
||||||
echo "DEB_VERSION_UPSTREAM=$(dpkg --info packages/proxmox-backup-server_*.deb | sed -n '/Version/ s/[^:]\+: \([0-9.]\+\)-[0-9]/\1/p')" >> $GITHUB_ENV
|
echo "DEB_VERSION_UPSTREAM=$(dpkg --info packages/proxmox-backup-server_*.deb | sed -n '/Version/ s/[^:]\+: \([0-9.]\+\)-[0-9]/\1/p')" >> $GITHUB_ENV
|
||||||
- name: Test packages
|
- name: Test packages
|
||||||
run: |
|
run: |
|
||||||
df -h
|
docker buildx build --build-arg baseimage=${{ github.event.inputs.baseimage }} --platform linux/arm64 -f .github/Dockerfile.installtest .
|
||||||
docker buildx build --build-arg baseimage=${{ github.event.inputs.baseimage }} --platform linux/${{ github.event.inputs.arch }} -f .github/Dockerfile.installtest .
|
|
||||||
|
build-arm64-cross:
|
||||||
|
if: ${{ github.event.inputs.arch == 'arm64-cross' }}
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Free up disk space
|
||||||
|
run: |
|
||||||
|
sudo rm -rf /usr/local/.ghcup
|
||||||
|
sudo rm -rf /usr/local/lib/android
|
||||||
|
sudo rm -rf /usr/local/lib/node_modules
|
||||||
|
sudo rm -rf /usr/share/dotnet
|
||||||
|
sudo rm -rf /usr/share/swift
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Build packages
|
||||||
|
run: |
|
||||||
|
options=""
|
||||||
|
[ "${{ github.event.inputs.package }}" = "client" ] && options="client"
|
||||||
|
[ "${RUNNER_DEBUG}" = "1" ] && options=$options" debug"
|
||||||
|
docker buildx build -o packages --build-arg buildoptions="cross github ${package}" --build-arg baseimage=${{ github.event.inputs.baseimage }} --platform linux/amd64 -f .github/Dockerfile.crosscompile-arm64 .
|
||||||
|
echo "DEB_VERSION=$(dpkg --info packages/proxmox-backup-server_*.deb | sed -n '/Version/ s/[^:]\+: //p')" >> $GITHUB_ENV
|
||||||
|
echo "DEB_VERSION_UPSTREAM=$(dpkg --info packages/proxmox-backup-server_*.deb | sed -n '/Version/ s/[^:]\+: \([0-9.]\+\)-[0-9]/\1/p')" >> $GITHUB_ENV
|
||||||
|
- name: Test packages
|
||||||
|
run: |
|
||||||
|
docker buildx build --build-arg baseimage=${{ github.event.inputs.baseimage }} --platform linux/arm64 -f .github/Dockerfile.installtest .
|
||||||
|
|
||||||
|
build-amd64:
|
||||||
|
if: ${{ github.event.inputs.arch == 'amd64' }}
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Free up disk space
|
||||||
|
run: |
|
||||||
|
sudo rm -rf /usr/local/.ghcup
|
||||||
|
sudo rm -rf /usr/local/lib/android
|
||||||
|
sudo rm -rf /usr/local/lib/node_modules
|
||||||
|
sudo rm -rf /usr/share/dotnet
|
||||||
|
sudo rm -rf /usr/share/swift
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Build packages
|
||||||
|
run: |
|
||||||
|
options=""
|
||||||
|
[ "${{ github.event.inputs.package }}" = "client" ] && options="client"
|
||||||
|
[ "${RUNNER_DEBUG}" = "1" ] && options=$options" debug"
|
||||||
|
docker buildx build -o packages --build-arg buildoptions="github ${package}" --build-arg baseimage=${{ github.event.inputs.baseimage }} --platform linux/amd64 .
|
||||||
|
echo "DEB_VERSION=$(dpkg --info packages/proxmox-backup-server_*.deb | sed -n '/Version/ s/[^:]\+: //p')" >> $GITHUB_ENV
|
||||||
|
echo "DEB_VERSION_UPSTREAM=$(dpkg --info packages/proxmox-backup-server_*.deb | sed -n '/Version/ s/[^:]\+: \([0-9.]\+\)-[0-9]/\1/p')" >> $GITHUB_ENV
|
||||||
|
- name: Test packages
|
||||||
|
run: |
|
||||||
|
docker buildx build --build-arg baseimage=${{ github.event.inputs.baseimage }} --platform linux/amd64 -f .github/Dockerfile.installtest .
|
||||||
|
|||||||
Reference in New Issue
Block a user