|
@@ -43,6 +43,28 @@ jobs:
|
|
$DATE_TIME = ([datetime]::Now.ToUniversalTime().toString("yyyy-MM-ddTHH:mm:ssZ")) | Out-String
|
|
$DATE_TIME = ([datetime]::Now.ToUniversalTime().toString("yyyy-MM-ddTHH:mm:ssZ")) | Out-String
|
|
go build -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=$GIT_COMMIT -X github.com/drakkan/sftpgo/version.date=$DATE_TIME" -o sftpgo.exe
|
|
go build -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=$GIT_COMMIT -X github.com/drakkan/sftpgo/version.date=$DATE_TIME" -o sftpgo.exe
|
|
|
|
|
|
|
|
+ - name: Gather cross build info
|
|
|
|
+ id: cross_info
|
|
|
|
+ if: ${{ matrix.upload-coverage && startsWith(matrix.os, 'ubuntu-') }}
|
|
|
|
+ run: |
|
|
|
|
+ GIT_COMMIT=$(git describe --always)
|
|
|
|
+ BUILD_DATE=$(date -u +%FT%TZ)
|
|
|
|
+ echo ::set-output name=sha::${GIT_COMMIT}
|
|
|
|
+ echo ::set-output name=created::${BUILD_DATE}
|
|
|
|
+
|
|
|
|
+ - name: Build with xgo
|
|
|
|
+ if: ${{ matrix.upload-coverage && startsWith(matrix.os, 'ubuntu-') }}
|
|
|
|
+ uses: crazy-max/ghaction-xgo@v1
|
|
|
|
+ with:
|
|
|
|
+ dest: cross
|
|
|
|
+ prefix: sftpgo
|
|
|
|
+ targets: linux/arm64
|
|
|
|
+ v: true
|
|
|
|
+ x: false
|
|
|
|
+ race: false
|
|
|
|
+ ldflags: -s -w -X github.com/drakkan/sftpgo/version.commit=${{ steps.cross_info.outputs.sha }} -X github.com/drakkan/sftpgo/version.date=${{ steps.cross_info.outputs.created }}
|
|
|
|
+ buildmode: default
|
|
|
|
+
|
|
- name: Run test cases using SQLite provider
|
|
- name: Run test cases using SQLite provider
|
|
run: go test -v -p 1 -timeout 10m ./... -coverprofile=coverage.txt -covermode=atomic
|
|
run: go test -v -p 1 -timeout 10m ./... -coverprofile=coverage.txt -covermode=atomic
|
|
|
|
|
|
@@ -86,6 +108,7 @@ 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: Prepare build artifact for Windows
|
|
- name: Prepare build artifact for Windows
|
|
if: startsWith(matrix.os, 'windows-')
|
|
if: startsWith(matrix.os, 'windows-')
|
|
@@ -127,6 +150,34 @@ jobs:
|
|
name: sftpgo-${{ steps.build_linux_pkgs.outputs.pkg-version }}-x86_64-rpm
|
|
name: sftpgo-${{ steps.build_linux_pkgs.outputs.pkg-version }}-x86_64-rpm
|
|
path: pkgs/dist/rpm/*
|
|
path: pkgs/dist/rpm/*
|
|
|
|
|
|
|
|
+ - name: Build Linux Packages arm64
|
|
|
|
+ id: build_linux_pkgs_arm64
|
|
|
|
+ if: ${{ matrix.upload-coverage && startsWith(matrix.os, 'ubuntu-') }}
|
|
|
|
+ run: |
|
|
|
|
+ cp cross/sftpgo-linux-arm64 .
|
|
|
|
+ cd pkgs
|
|
|
|
+ rm -rf dist
|
|
|
|
+ ./build.sh
|
|
|
|
+ PKG_VERSION=$(cat dist/version)
|
|
|
|
+ echo "::set-output name=pkg-version::${PKG_VERSION}"
|
|
|
|
+ env:
|
|
|
|
+ NFPM_ARCH: arm64
|
|
|
|
+ BIN_SUFFIX: -linux-arm64
|
|
|
|
+
|
|
|
|
+ - name: Upload Debian Package arm64
|
|
|
|
+ if: ${{ matrix.upload-coverage && startsWith(matrix.os, 'ubuntu-') }}
|
|
|
|
+ uses: actions/upload-artifact@v2
|
|
|
|
+ with:
|
|
|
|
+ name: sftpgo-${{ steps.build_linux_pkgs.outputs.pkg-version }}-arm64-deb
|
|
|
|
+ path: pkgs/dist/deb/*
|
|
|
|
+
|
|
|
|
+ - name: Upload RPM Package arm64
|
|
|
|
+ if: ${{ matrix.upload-coverage && startsWith(matrix.os, 'ubuntu-') }}
|
|
|
|
+ uses: actions/upload-artifact@v2
|
|
|
|
+ with:
|
|
|
|
+ name: sftpgo-${{ steps.build_linux_pkgs.outputs.pkg-version }}-arm64-rpm
|
|
|
|
+ path: pkgs/dist/rpm/*
|
|
|
|
+
|
|
test-postgresql-mysql:
|
|
test-postgresql-mysql:
|
|
name: Test with PostgreSQL/MySQL
|
|
name: Test with PostgreSQL/MySQL
|
|
runs-on: ubuntu-latest
|
|
runs-on: ubuntu-latest
|