mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
CI: add armv7 support
This commit is contained in:
15
.github/workflows/development.yml
vendored
15
.github/workflows/development.yml
vendored
@@ -228,6 +228,10 @@ jobs:
|
|||||||
distro: ubuntu18.04
|
distro: ubuntu18.04
|
||||||
go: latest
|
go: latest
|
||||||
go-arch: ppc64le
|
go-arch: ppc64le
|
||||||
|
- arch: armv7
|
||||||
|
distro: ubuntu18.04
|
||||||
|
go: latest
|
||||||
|
go-arch: arm
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
@@ -274,10 +278,19 @@ jobs:
|
|||||||
else
|
else
|
||||||
GO_VERSION=${{ matrix.go }}
|
GO_VERSION=${{ matrix.go }}
|
||||||
fi
|
fi
|
||||||
curl --retry 5 --retry-delay 2 --connect-timeout 10 -o go.tar.gz -L https://golang.org/dl/${GO_VERSION}.linux-${{ matrix.go-arch }}.tar.gz
|
GO_DOWNLOAD_ARCH=${{ matrix.go-arch }}
|
||||||
|
if [ ${{ matrix.arch}} == 'armv7' ]
|
||||||
|
then
|
||||||
|
GO_DOWNLOAD_ARCH=armv6l
|
||||||
|
fi
|
||||||
|
curl --retry 5 --retry-delay 2 --connect-timeout 10 -o go.tar.gz -L https://golang.org/dl/${GO_VERSION}.linux-${GO_DOWNLOAD_ARCH}.tar.gz
|
||||||
tar -C /usr/local -xzf go.tar.gz
|
tar -C /usr/local -xzf go.tar.gz
|
||||||
run: |
|
run: |
|
||||||
export PATH=$PATH:/usr/local/go/bin
|
export PATH=$PATH:/usr/local/go/bin
|
||||||
|
if [ ${{ matrix.arch}} == 'armv7' ]
|
||||||
|
then
|
||||||
|
export GOARM=7
|
||||||
|
fi
|
||||||
go build -trimpath -ldflags "-s -w -X github.com/drakkan/sftpgo/v2/version.commit=`git describe --always --dirty` -X github.com/drakkan/sftpgo/v2/version.date=`date -u +%FT%TZ`" -o sftpgo
|
go build -trimpath -ldflags "-s -w -X github.com/drakkan/sftpgo/v2/version.commit=`git describe --always --dirty` -X github.com/drakkan/sftpgo/v2/version.date=`date -u +%FT%TZ`" -o sftpgo
|
||||||
mkdir -p output/{init,bash_completion,zsh_completion}
|
mkdir -p output/{init,bash_completion,zsh_completion}
|
||||||
cp sftpgo.json output/
|
cp sftpgo.json output/
|
||||||
|
|||||||
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
@@ -152,7 +152,7 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
builder: ${{ steps.builder.outputs.name }}
|
builder: ${{ steps.builder.outputs.name }}
|
||||||
file: ./${{ steps.info.outputs.dockerfile }}
|
file: ./${{ steps.info.outputs.dockerfile }}
|
||||||
platforms: linux/amd64,linux/arm64,linux/ppc64le
|
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/arm/v7
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.info.outputs.tags }}
|
tags: ${{ steps.info.outputs.tags }}
|
||||||
build-args: |
|
build-args: |
|
||||||
|
|||||||
39
.github/workflows/release.yml
vendored
39
.github/workflows/release.yml
vendored
@@ -5,7 +5,7 @@ on:
|
|||||||
tags: 'v*'
|
tags: 'v*'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GO_VERSION: 1.16.5
|
GO_VERSION: 1.17.1
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prepare-sources-with-deps:
|
prepare-sources-with-deps:
|
||||||
@@ -206,6 +206,12 @@ jobs:
|
|||||||
deb-arch: ppc64el
|
deb-arch: ppc64el
|
||||||
rpm-arch: ppc64le
|
rpm-arch: ppc64le
|
||||||
tar-arch: ppc64le
|
tar-arch: ppc64le
|
||||||
|
- arch: armv7
|
||||||
|
distro: ubuntu18.04
|
||||||
|
go-arch: arm
|
||||||
|
deb-arch: armhf
|
||||||
|
rpm-arch: arm
|
||||||
|
tar-arch: armv7
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@@ -265,7 +271,12 @@ jobs:
|
|||||||
install: |
|
install: |
|
||||||
apt-get update -q -y
|
apt-get update -q -y
|
||||||
apt-get install -q -y curl gcc git xz-utils
|
apt-get install -q -y curl gcc git xz-utils
|
||||||
curl --retry 5 --retry-delay 2 --connect-timeout 10 -o go.tar.gz -L https://golang.org/dl/go${{ steps.get_version.outputs.GO_VERSION }}.linux-${{ matrix.go-arch }}.tar.gz
|
GO_DOWNLOAD_ARCH=${{ matrix.go-arch }}
|
||||||
|
if [ ${{ matrix.arch}} == 'armv7' ]
|
||||||
|
then
|
||||||
|
GO_DOWNLOAD_ARCH=armv6l
|
||||||
|
fi
|
||||||
|
curl --retry 5 --retry-delay 2 --connect-timeout 10 -o go.tar.gz -L https://golang.org/dl/go${{ steps.get_version.outputs.GO_VERSION }}.linux-${GO_DOWNLOAD_ARCH}.tar.gz
|
||||||
tar -C /usr/local -xzf go.tar.gz
|
tar -C /usr/local -xzf go.tar.gz
|
||||||
run: |
|
run: |
|
||||||
export PATH=$PATH:/usr/local/go/bin
|
export PATH=$PATH:/usr/local/go/bin
|
||||||
@@ -349,16 +360,23 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_linux_ppc64le.tar.xz
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_linux_ppc64le.tar.xz
|
||||||
|
|
||||||
|
- name: Download armv7 artifact
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_linux_armv7.tar.xz
|
||||||
|
|
||||||
- name: Build bundle
|
- name: Build bundle
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir -p bundle/{arm64,ppc64le}
|
mkdir -p bundle/{arm64,ppc64le,armv7}
|
||||||
cd bundle
|
cd bundle
|
||||||
tar xvf ../sftpgo_${SFTPGO_VERSION}_linux_x86_64.tar.xz
|
tar xvf ../sftpgo_${SFTPGO_VERSION}_linux_x86_64.tar.xz
|
||||||
cd arm64
|
cd arm64
|
||||||
tar xvf ../../sftpgo_${SFTPGO_VERSION}_linux_arm64.tar.xz sftpgo
|
tar xvf ../../sftpgo_${SFTPGO_VERSION}_linux_arm64.tar.xz sftpgo
|
||||||
cd ../ppc64le
|
cd ../ppc64le
|
||||||
tar xvf ../../sftpgo_${SFTPGO_VERSION}_linux_ppc64le.tar.xz sftpgo
|
tar xvf ../../sftpgo_${SFTPGO_VERSION}_linux_ppc64le.tar.xz sftpgo
|
||||||
|
cd ../armv7
|
||||||
|
tar xvf ../../sftpgo_${SFTPGO_VERSION}_linux_armv7.tar.xz sftpgo
|
||||||
cd ..
|
cd ..
|
||||||
tar cJvf sftpgo_${SFTPGO_VERSION}_linux_bundle.tar.xz *
|
tar cJvf sftpgo_${SFTPGO_VERSION}_linux_bundle.tar.xz *
|
||||||
cd ..
|
cd ..
|
||||||
@@ -403,6 +421,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_linux_ppc64le.tar.xz
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_linux_ppc64le.tar.xz
|
||||||
|
|
||||||
|
- name: Download armv7 artifact
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: sftpgo_${{ steps.get_version.outputs.SFTPGO_VERSION }}_linux_armv7.tar.xz
|
||||||
|
|
||||||
- name: Download Linux bundle artifact
|
- name: Download Linux bundle artifact
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
@@ -423,6 +446,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: sftpgo_${{ steps.get_version.outputs.PKG_VERSION }}-1_ppc64el.deb
|
name: sftpgo_${{ steps.get_version.outputs.PKG_VERSION }}-1_ppc64el.deb
|
||||||
|
|
||||||
|
- name: Download Deb armv7 artifact
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: sftpgo_${{ steps.get_version.outputs.PKG_VERSION }}-1_armhf.deb
|
||||||
|
|
||||||
- name: Download RPM x86_64 artifact
|
- name: Download RPM x86_64 artifact
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
@@ -438,6 +466,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: sftpgo-${{ steps.get_version.outputs.PKG_VERSION }}-1.ppc64le.rpm
|
name: sftpgo-${{ steps.get_version.outputs.PKG_VERSION }}-1.ppc64le.rpm
|
||||||
|
|
||||||
|
- name: Download RPM armv7 artifact
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: sftpgo-${{ steps.get_version.outputs.PKG_VERSION }}-1.arm.rpm
|
||||||
|
|
||||||
- name: Download macOS x86_64 artifact
|
- name: Download macOS x86_64 artifact
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
7
pkgs/debian/sftpgo.install.armhf
Normal file
7
pkgs/debian/sftpgo.install.armhf
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
armv7/sftpgo usr/bin
|
||||||
|
sftpgo.json etc/sftpgo
|
||||||
|
init/sftpgo.service lib/systemd/system
|
||||||
|
bash_completion/sftpgo usr/share/bash-completion/completions
|
||||||
|
man/man1/* usr/share/man/man1
|
||||||
|
templates usr/share/sftpgo
|
||||||
|
static usr/share/sftpgo
|
||||||
Reference in New Issue
Block a user