mirror of
https://github.com/stalwartlabs/proxy.git
synced 2026-10-31 00:12:00 +00:00
v1.0.5
This commit is contained in:
+29
-10
@@ -115,31 +115,40 @@ jobs:
|
||||
matrix:
|
||||
include:
|
||||
- target: x86_64-unknown-linux-gnu
|
||||
runner: ubuntu-latest
|
||||
platform: linux/amd64
|
||||
suffix: ""
|
||||
- target: x86_64-unknown-linux-musl
|
||||
runner: ubuntu-latest
|
||||
platform: linux/amd64
|
||||
suffix: "-alpine"
|
||||
- target: aarch64-unknown-linux-gnu
|
||||
runner: ubuntu-24.04-arm
|
||||
platform: linux/arm64
|
||||
suffix: ""
|
||||
- target: aarch64-unknown-linux-musl
|
||||
runner: ubuntu-24.04-arm
|
||||
platform: linux/arm64
|
||||
suffix: "-alpine"
|
||||
- target: armv7-unknown-linux-gnueabihf
|
||||
runner: ubuntu-latest
|
||||
platform: linux/arm/v7
|
||||
suffix: ""
|
||||
- target: armv7-unknown-linux-musleabihf
|
||||
runner: ubuntu-latest
|
||||
platform: linux/arm/v7
|
||||
suffix: "-alpine"
|
||||
- target: arm-unknown-linux-gnueabihf
|
||||
runner: ubuntu-latest
|
||||
platform: linux/arm/v6
|
||||
suffix: ""
|
||||
- target: arm-unknown-linux-musleabihf
|
||||
runner: ubuntu-latest
|
||||
platform: linux/arm/v6
|
||||
suffix: "-alpine"
|
||||
name: Build / ${{matrix.target}}
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ${{matrix.runner}}
|
||||
timeout-minutes: 180
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7
|
||||
@@ -155,23 +164,31 @@ jobs:
|
||||
- name: Add swap (heavy ARM targets)
|
||||
if: contains(matrix.target, 'arm') || contains(matrix.target, 'aarch64')
|
||||
run: |
|
||||
mnt_avail=$(df --output=avail -k /mnt | tail -1)
|
||||
if [ "$mnt_avail" -lt 18874368 ]; then
|
||||
echo "Insufficient space on /mnt (${mnt_avail}K available), aborting swap setup"
|
||||
swap_dir=""
|
||||
for dir in /mnt /; do
|
||||
if [ -d "$dir" ] && [ "$(df --output=avail -k "$dir" | tail -1)" -ge 18874368 ]; then
|
||||
swap_dir="$dir"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ -z "$swap_dir" ]; then
|
||||
echo "Insufficient space for swap on /mnt or /, aborting swap setup"
|
||||
df -h
|
||||
exit 1
|
||||
fi
|
||||
sudo fallocate -l 16G /mnt/swapfile
|
||||
sudo chmod 600 /mnt/swapfile
|
||||
sudo mkswap /mnt/swapfile
|
||||
sudo swapon /mnt/swapfile
|
||||
sudo fallocate -l 16G "${swap_dir%/}/swapfile"
|
||||
sudo chmod 600 "${swap_dir%/}/swapfile"
|
||||
sudo mkswap "${swap_dir%/}/swapfile"
|
||||
sudo swapon "${swap_dir%/}/swapfile"
|
||||
sudo sysctl vm.swappiness=80
|
||||
free -h
|
||||
swapon --show
|
||||
|
||||
- name: Set up QEMU
|
||||
if: startsWith(matrix.platform, 'linux/arm/')
|
||||
uses: docker/setup-qemu-action@v4
|
||||
with:
|
||||
platforms: "arm64,arm"
|
||||
platforms: "arm"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v4
|
||||
@@ -190,6 +207,7 @@ jobs:
|
||||
password: ${{github.token}}
|
||||
|
||||
- name: Log In to DockerHub
|
||||
if: github.event_name == 'push' || inputs.Docker
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
username: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
@@ -207,7 +225,7 @@ jobs:
|
||||
path: |
|
||||
var-cache-apt
|
||||
var-lib-apt
|
||||
key: apt-cache-${{ hashFiles('Dockerfile.build') }}
|
||||
key: apt-cache-${{ runner.arch }}-${{ hashFiles('Dockerfile.build') }}
|
||||
|
||||
- name: Cache Cargo
|
||||
uses: actions/cache@v6.1.0
|
||||
@@ -244,6 +262,7 @@ jobs:
|
||||
type=ref,event=branch,prefix=branch-
|
||||
type=edge,branch=main
|
||||
type=semver,pattern=v{{major}}.{{minor}}
|
||||
type=semver,pattern=v{{major}}
|
||||
|
||||
- name: Build Artifact
|
||||
id: bake
|
||||
|
||||
Reference in New Issue
Block a user