mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-08 23:28:39 +03:00
CI: add ppc64le support
This commit is contained in:
34
.github/workflows/development.yml
vendored
34
.github/workflows/development.yml
vendored
@@ -86,7 +86,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
dest: cross
|
dest: cross
|
||||||
prefix: sftpgo
|
prefix: sftpgo
|
||||||
targets: linux/arm64
|
targets: linux/arm64,linux/ppc64le
|
||||||
v: true
|
v: true
|
||||||
x: false
|
x: false
|
||||||
race: false
|
race: false
|
||||||
@@ -108,7 +108,12 @@ jobs:
|
|||||||
./sftpgo gen completion zsh > output/zsh_completion/_sftpgo
|
./sftpgo gen completion zsh > output/zsh_completion/_sftpgo
|
||||||
./sftpgo gen man -d output/man/man1
|
./sftpgo gen man -d output/man/man1
|
||||||
gzip output/man/man1/*
|
gzip output/man/man1/*
|
||||||
cp cross/sftpgo-linux-arm64 output/ || :
|
|
||||||
|
- name: Copy cross compiled Linux binaries
|
||||||
|
if: ${{ matrix.upload-coverage && startsWith(matrix.os, 'ubuntu-') }}
|
||||||
|
run: |
|
||||||
|
cp cross/sftpgo-linux-arm64 output/
|
||||||
|
cp cross/sftpgo-linux-ppc64le output/
|
||||||
|
|
||||||
- name: Prepare build artifact for Windows
|
- name: Prepare build artifact for Windows
|
||||||
if: startsWith(matrix.os, 'windows-')
|
if: startsWith(matrix.os, 'windows-')
|
||||||
@@ -132,6 +137,7 @@ jobs:
|
|||||||
if: ${{ matrix.upload-coverage && startsWith(matrix.os, 'ubuntu-') }}
|
if: ${{ matrix.upload-coverage && startsWith(matrix.os, 'ubuntu-') }}
|
||||||
run: |
|
run: |
|
||||||
cp -r pkgs pkgs_arm64
|
cp -r pkgs pkgs_arm64
|
||||||
|
cp -r pkgs pkgs_ppc64le
|
||||||
cd pkgs
|
cd pkgs
|
||||||
./build.sh
|
./build.sh
|
||||||
cd ..
|
cd ..
|
||||||
@@ -140,6 +146,12 @@ jobs:
|
|||||||
cp cross/sftpgo${BIN_SUFFIX} .
|
cp cross/sftpgo${BIN_SUFFIX} .
|
||||||
cd pkgs_arm64
|
cd pkgs_arm64
|
||||||
./build.sh
|
./build.sh
|
||||||
|
cd ..
|
||||||
|
export NFPM_ARCH=ppc64le
|
||||||
|
export BIN_SUFFIX=-linux-ppc64le
|
||||||
|
cp cross/sftpgo${BIN_SUFFIX} .
|
||||||
|
cd pkgs_ppc64le
|
||||||
|
./build.sh
|
||||||
PKG_VERSION=$(cat dist/version)
|
PKG_VERSION=$(cat dist/version)
|
||||||
echo "::set-output name=pkg-version::${PKG_VERSION}"
|
echo "::set-output name=pkg-version::${PKG_VERSION}"
|
||||||
|
|
||||||
@@ -162,14 +174,28 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: sftpgo-${{ steps.build_linux_pkgs.outputs.pkg-version }}-arm64-deb
|
name: sftpgo-${{ steps.build_linux_pkgs.outputs.pkg-version }}-arm64-deb
|
||||||
path: pkgs/dist/deb/*
|
path: pkgs_arm64/dist/deb/*
|
||||||
|
|
||||||
- name: Upload RPM Package arm64
|
- name: Upload RPM Package arm64
|
||||||
if: ${{ matrix.upload-coverage && startsWith(matrix.os, 'ubuntu-') }}
|
if: ${{ matrix.upload-coverage && startsWith(matrix.os, 'ubuntu-') }}
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: sftpgo-${{ steps.build_linux_pkgs.outputs.pkg-version }}-arm64-rpm
|
name: sftpgo-${{ steps.build_linux_pkgs.outputs.pkg-version }}-arm64-rpm
|
||||||
path: pkgs/dist/rpm/*
|
path: pkgs_arm64/dist/rpm/*
|
||||||
|
|
||||||
|
- name: Upload Debian Package ppc64le
|
||||||
|
if: ${{ matrix.upload-coverage && startsWith(matrix.os, 'ubuntu-') }}
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: sftpgo-${{ steps.build_linux_pkgs.outputs.pkg-version }}-ppc64le-deb
|
||||||
|
path: pkgs_ppc64le/dist/deb/*
|
||||||
|
|
||||||
|
- name: Upload RPM Package ppc64le
|
||||||
|
if: ${{ matrix.upload-coverage && startsWith(matrix.os, 'ubuntu-') }}
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: sftpgo-${{ steps.build_linux_pkgs.outputs.pkg-version }}-ppc64le-rpm
|
||||||
|
path: pkgs_ppc64le/dist/rpm/*
|
||||||
|
|
||||||
test-postgresql-mysql:
|
test-postgresql-mysql:
|
||||||
name: Test with PostgreSQL/MySQL
|
name: Test with PostgreSQL/MySQL
|
||||||
|
|||||||
71
.github/workflows/release.yml
vendored
71
.github/workflows/release.yml
vendored
@@ -5,7 +5,7 @@ on:
|
|||||||
tags: 'v*'
|
tags: 'v*'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GO_VERSION: 1.15
|
GO_VERSION: 1.15.4
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
create-release:
|
create-release:
|
||||||
@@ -160,7 +160,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
dest: cross
|
dest: cross
|
||||||
prefix: sftpgo
|
prefix: sftpgo
|
||||||
targets: linux/arm64
|
targets: linux/arm64,linux/ppc64le
|
||||||
v: true
|
v: true
|
||||||
x: false
|
x: false
|
||||||
race: false
|
race: false
|
||||||
@@ -191,7 +191,12 @@ jobs:
|
|||||||
./sftpgo gen man -d output/man/man1
|
./sftpgo gen man -d output/man/man1
|
||||||
gzip output/man/man1/*
|
gzip output/man/man1/*
|
||||||
cp examples/rest-api-cli/sftpgo_api_cli output/examples/rest-api-cli/
|
cp examples/rest-api-cli/sftpgo_api_cli output/examples/rest-api-cli/
|
||||||
|
if [ $OS == 'linux' ]
|
||||||
|
then
|
||||||
cp -r output output_arm64
|
cp -r output output_arm64
|
||||||
|
cp -r output output_ppc64le
|
||||||
|
cp -r output output_all
|
||||||
|
fi
|
||||||
cd output
|
cd output
|
||||||
tar cJvf sftpgo_${SFTPGO_VERSION}_${OS}_x86_64.tar.xz *
|
tar cJvf sftpgo_${SFTPGO_VERSION}_${OS}_x86_64.tar.xz *
|
||||||
cd ..
|
cd ..
|
||||||
@@ -201,6 +206,16 @@ jobs:
|
|||||||
cd output_arm64
|
cd output_arm64
|
||||||
tar cJvf sftpgo_${SFTPGO_VERSION}_${OS}_arm64.tar.xz *
|
tar cJvf sftpgo_${SFTPGO_VERSION}_${OS}_arm64.tar.xz *
|
||||||
cd ..
|
cd ..
|
||||||
|
cp cross/sftpgo-linux-ppc64le output_ppc64le/sftpgo
|
||||||
|
cd output_ppc64le
|
||||||
|
tar cJvf sftpgo_${SFTPGO_VERSION}_${OS}_ppc64le.tar.xz *
|
||||||
|
cd ..
|
||||||
|
mkdir output_all/{arm64,ppc64le}
|
||||||
|
cp cross/sftpgo-linux-arm64 output_all/arm64/sftpgo
|
||||||
|
cp cross/sftpgo-linux-ppc64le output_all/ppc64le/sftpgo
|
||||||
|
cd output_all
|
||||||
|
tar cJvf sftpgo_${SFTPGO_VERSION}_${OS}_bundle.tar.xz *
|
||||||
|
cd ..
|
||||||
fi
|
fi
|
||||||
env:
|
env:
|
||||||
SFTPGO_VERSION: ${{ steps.get_version.outputs.VERSION }}
|
SFTPGO_VERSION: ${{ steps.get_version.outputs.VERSION }}
|
||||||
@@ -211,6 +226,7 @@ jobs:
|
|||||||
if: ${{ matrix.os == 'ubuntu-latest' }}
|
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||||
run: |
|
run: |
|
||||||
cp -r pkgs pkgs_arm64
|
cp -r pkgs pkgs_arm64
|
||||||
|
cp -r pkgs pkgs_ppc64le
|
||||||
cd pkgs
|
cd pkgs
|
||||||
./build.sh
|
./build.sh
|
||||||
cd ..
|
cd ..
|
||||||
@@ -219,6 +235,13 @@ jobs:
|
|||||||
cp cross/sftpgo${BIN_SUFFIX} .
|
cp cross/sftpgo${BIN_SUFFIX} .
|
||||||
cd pkgs_arm64
|
cd pkgs_arm64
|
||||||
./build.sh
|
./build.sh
|
||||||
|
cd ..
|
||||||
|
export NFPM_ARCH=ppc64le
|
||||||
|
export BIN_SUFFIX=-linux-ppc64le
|
||||||
|
cp cross/sftpgo${BIN_SUFFIX} .
|
||||||
|
cd pkgs_ppc64le
|
||||||
|
./build.sh
|
||||||
|
cd ..
|
||||||
PKG_VERSION=${SFTPGO_VERSION:1}
|
PKG_VERSION=${SFTPGO_VERSION:1}
|
||||||
echo "::set-output name=pkg-version::${PKG_VERSION}"
|
echo "::set-output name=pkg-version::${PKG_VERSION}"
|
||||||
env:
|
env:
|
||||||
@@ -294,6 +317,28 @@ jobs:
|
|||||||
asset_name: sftpgo_${{ steps.get_version.outputs.VERSION }}_${{ steps.get_os_name.outputs.OS }}_arm64.tar.xz
|
asset_name: sftpgo_${{ steps.get_version.outputs.VERSION }}_${{ steps.get_os_name.outputs.OS }}_arm64.tar.xz
|
||||||
asset_content_type: application/x-xz
|
asset_content_type: application/x-xz
|
||||||
|
|
||||||
|
- name: Upload Linux/ppc64le Release
|
||||||
|
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.upload_url.outputs.url }}
|
||||||
|
asset_path: ./output_ppc64le/sftpgo_${{ steps.get_version.outputs.VERSION }}_${{ steps.get_os_name.outputs.OS }}_ppc64le.tar.xz
|
||||||
|
asset_name: sftpgo_${{ steps.get_version.outputs.VERSION }}_${{ steps.get_os_name.outputs.OS }}_ppc64le.tar.xz
|
||||||
|
asset_content_type: application/x-xz
|
||||||
|
|
||||||
|
- name: Upload Linux Bundle Release
|
||||||
|
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.upload_url.outputs.url }}
|
||||||
|
asset_path: ./output_all/sftpgo_${{ steps.get_version.outputs.VERSION }}_${{ steps.get_os_name.outputs.OS }}_bundle.tar.xz
|
||||||
|
asset_name: sftpgo_${{ steps.get_version.outputs.VERSION }}_${{ steps.get_os_name.outputs.OS }}_bundle.tar.xz
|
||||||
|
asset_content_type: application/x-xz
|
||||||
|
|
||||||
- name: Upload Windows Release
|
- name: Upload Windows Release
|
||||||
if: startsWith(matrix.os, 'windows-')
|
if: startsWith(matrix.os, 'windows-')
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
@@ -359,3 +404,25 @@ jobs:
|
|||||||
asset_path: ./pkgs_arm64/dist/rpm/sftpgo-${{ steps.build_linux_pkgs.outputs.pkg-version }}-1.aarch64.rpm
|
asset_path: ./pkgs_arm64/dist/rpm/sftpgo-${{ steps.build_linux_pkgs.outputs.pkg-version }}-1.aarch64.rpm
|
||||||
asset_name: sftpgo-${{ steps.build_linux_pkgs.outputs.pkg-version }}-1.aarch64.rpm
|
asset_name: sftpgo-${{ steps.build_linux_pkgs.outputs.pkg-version }}-1.aarch64.rpm
|
||||||
asset_content_type: application/x-rpm
|
asset_content_type: application/x-rpm
|
||||||
|
|
||||||
|
- name: Upload Debian Package ppc64le
|
||||||
|
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.upload_url.outputs.url }}
|
||||||
|
asset_path: ./pkgs_ppc64le/dist/deb/sftpgo_${{ steps.build_linux_pkgs.outputs.pkg-version }}-1_ppc64el.deb
|
||||||
|
asset_name: sftpgo_${{ steps.build_linux_pkgs.outputs.pkg-version }}-1_ppc64el.deb
|
||||||
|
asset_content_type: application/vnd.debian.binary-package
|
||||||
|
|
||||||
|
- name: Upload RPM Package ppc64le
|
||||||
|
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.upload_url.outputs.url }}
|
||||||
|
asset_path: ./pkgs_ppc64le/dist/rpm/sftpgo-${{ steps.build_linux_pkgs.outputs.pkg-version }}-1.ppc64le.rpm
|
||||||
|
asset_name: sftpgo-${{ steps.build_linux_pkgs.outputs.pkg-version }}-1.ppc64le.rpm
|
||||||
|
asset_content_type: application/x-rpm
|
||||||
|
|||||||
Reference in New Issue
Block a user