Windows setup: require Windows 10
Windows 7 is EOL since several months now
This commit is contained in:
parent
d2a739f8f6
commit
aec372ca31
3 changed files with 44 additions and 45 deletions
34
.github/workflows/development.yml
vendored
34
.github/workflows/development.yml
vendored
|
@ -6,11 +6,11 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GOLATEST: 1.14
|
GO_LATEST: 1.14
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-test-upload:
|
test-deploy:
|
||||||
name: Build, run tests and upload build artifacts
|
name: Test and deploy
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -23,16 +23,16 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go }}
|
go-version: ${{ matrix.go }}
|
||||||
|
|
||||||
- name: Build Linux/macOS
|
- name: Build for Linux/macOS
|
||||||
if: startsWith(matrix.os, 'windows-') != true
|
if: startsWith(matrix.os, 'windows-') != true
|
||||||
run: go build -i -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=`git describe --always --dirty` -X github.com/drakkan/sftpgo/version.date=`date -u +%FT%TZ`" -o sftpgo
|
run: go build -i -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=`git describe --always --dirty` -X github.com/drakkan/sftpgo/version.date=`date -u +%FT%TZ`" -o sftpgo
|
||||||
|
|
||||||
- name: Build Windows
|
- name: Build for Windows
|
||||||
if: startsWith(matrix.os, 'windows-')
|
if: startsWith(matrix.os, 'windows-')
|
||||||
run: |
|
run: |
|
||||||
$GIT_COMMIT = (git describe --always --dirty) | Out-String
|
$GIT_COMMIT = (git describe --always --dirty) | Out-String
|
||||||
|
@ -46,15 +46,14 @@ jobs:
|
||||||
- name: Run test cases using SQLite provider
|
- name: Run test cases using SQLite provider
|
||||||
run: go test -v ./... -coverprofile=coverage.txt -covermode=atomic
|
run: go test -v ./... -coverprofile=coverage.txt -covermode=atomic
|
||||||
|
|
||||||
- name: Upload to Codecov
|
- name: Upload coverage to Codecov
|
||||||
if: ${{ matrix.go == env.GOLATEST && startsWith(matrix.os, 'windows-') != true }}
|
if: ${{ matrix.go == env.GO_LATEST && startsWith(matrix.os, 'windows-') != true }}
|
||||||
uses: codecov/codecov-action@v1
|
uses: codecov/codecov-action@v1
|
||||||
with:
|
with:
|
||||||
file: ./coverage.txt
|
file: ./coverage.txt
|
||||||
fail_ci_if_error: false
|
fail_ci_if_error: false
|
||||||
|
|
||||||
- name: Run test cases using bolt provider
|
- name: Run test cases using bolt provider
|
||||||
if: ${{ matrix.go == env.GOLATEST }}
|
|
||||||
run: |
|
run: |
|
||||||
go test -v ./config -covermode=atomic
|
go test -v ./config -covermode=atomic
|
||||||
go test -v ./httpd -covermode=atomic
|
go test -v ./httpd -covermode=atomic
|
||||||
|
@ -64,13 +63,12 @@ jobs:
|
||||||
SFTPGO_DATA_PROVIDER__NAME: 'sftpgo_bolt.db'
|
SFTPGO_DATA_PROVIDER__NAME: 'sftpgo_bolt.db'
|
||||||
|
|
||||||
- name: Run test cases using memory provider
|
- name: Run test cases using memory provider
|
||||||
if: ${{ matrix.go == env.GOLATEST }}
|
|
||||||
run: go test -v ./... -covermode=atomic
|
run: go test -v ./... -covermode=atomic
|
||||||
env:
|
env:
|
||||||
SFTPGO_DATA_PROVIDER__DRIVER: memory
|
SFTPGO_DATA_PROVIDER__DRIVER: memory
|
||||||
SFTPGO_DATA_PROVIDER__NAME: ''
|
SFTPGO_DATA_PROVIDER__NAME: ''
|
||||||
|
|
||||||
- name: Prepare artifacts Linux/macOS
|
- name: Prepare build artifact for Linux/macOS
|
||||||
if: startsWith(matrix.os, 'windows-') != true
|
if: startsWith(matrix.os, 'windows-') != true
|
||||||
run: |
|
run: |
|
||||||
mkdir output
|
mkdir output
|
||||||
|
@ -79,25 +77,25 @@ jobs:
|
||||||
cp -r templates output/
|
cp -r templates output/
|
||||||
cp -r static output/
|
cp -r static output/
|
||||||
|
|
||||||
- name: Prepare artifacts Windows
|
- name: Prepare build artifact for Windows
|
||||||
if: startsWith(matrix.os, 'windows-')
|
if: startsWith(matrix.os, 'windows-')
|
||||||
run: |
|
run: |
|
||||||
mkdir output
|
mkdir output
|
||||||
xcopy .\sftpgo.exe .\output
|
copy .\sftpgo.exe .\output
|
||||||
xcopy .\sftpgo.json .\output
|
copy .\sftpgo.json .\output
|
||||||
mkdir output\templates
|
mkdir output\templates
|
||||||
xcopy .\templates .\output\templates\ /E
|
xcopy .\templates .\output\templates\ /E
|
||||||
mkdir output\static
|
mkdir output\static
|
||||||
xcopy .\static .\output\static\ /E
|
xcopy .\static .\output\static\ /E
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload build artifact
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: sftpgo-${{ matrix.os }}-go${{ matrix.go }}
|
name: sftpgo-${{ matrix.os }}-go${{ matrix.go }}
|
||||||
path: output
|
path: output
|
||||||
|
|
||||||
tests-postgresql-mysql:
|
test-postgresql-mysql:
|
||||||
name: Run test cases using PostgreSQL/MySQL data providers
|
name: Test with PostgreSQL/MySQL
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
@ -132,7 +130,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.14
|
go-version: 1.14
|
||||||
|
|
52
.github/workflows/release.yml
vendored
52
.github/workflows/release.yml
vendored
|
@ -1,15 +1,15 @@
|
||||||
name: Release a tag
|
name: Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags: 'v*'
|
tags: 'v*'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GOVERSION: 1.14
|
GO_VERSION: 1.14
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
create-release:
|
create-release:
|
||||||
name: Create Release
|
name: Create
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
|
@ -27,24 +27,24 @@ jobs:
|
||||||
run: echo "${{ steps.create_release.outputs.upload_url }}" > ./upload_url.txt
|
run: echo "${{ steps.create_release.outputs.upload_url }}" > ./upload_url.txt
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: 'Store release upload URL'
|
- name: Store release upload URL
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: upload_url
|
name: upload_url
|
||||||
path: ./upload_url.txt
|
path: ./upload_url.txt
|
||||||
|
|
||||||
upload-src-with-deps:
|
release-sources-with-deps:
|
||||||
name: Upload sources with dependencies
|
name: Publish sources
|
||||||
needs: create-release
|
needs: create-release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: ${{ env.GOVERSION }}
|
go-version: ${{ env.GO_VERSION }}
|
||||||
|
|
||||||
- name: Get version
|
- name: Get SFTPGo version
|
||||||
id: get_version
|
id: get_version
|
||||||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
||||||
|
|
||||||
|
@ -56,11 +56,12 @@ jobs:
|
||||||
env:
|
env:
|
||||||
SFTPGO_VERSION: ${{ steps.get_version.outputs.VERSION }}
|
SFTPGO_VERSION: ${{ steps.get_version.outputs.VERSION }}
|
||||||
|
|
||||||
- uses: actions/download-artifact@v2
|
- name: Download release upload URL
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: upload_url
|
name: upload_url
|
||||||
|
|
||||||
- name: Get upload URL
|
- name: Get release upload URL
|
||||||
id: upload_url
|
id: upload_url
|
||||||
run: |
|
run: |
|
||||||
URL=$(cat upload_url.txt)
|
URL=$(cat upload_url.txt)
|
||||||
|
@ -78,8 +79,8 @@ jobs:
|
||||||
asset_name: sftpgo_${{ steps.get_version.outputs.VERSION }}_src_with_deps.tar.xz
|
asset_name: sftpgo_${{ steps.get_version.outputs.VERSION }}_src_with_deps.tar.xz
|
||||||
asset_content_type: application/x-xz
|
asset_content_type: application/x-xz
|
||||||
|
|
||||||
build:
|
publish:
|
||||||
name: Build Release
|
name: Publish binary
|
||||||
needs: create-release
|
needs: create-release
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -88,10 +89,10 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: ${{ env.GOVERSION }}
|
go-version: ${{ env.GO_VERSION }}
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
if: startsWith(matrix.os, 'windows-')
|
if: startsWith(matrix.os, 'windows-')
|
||||||
|
@ -99,11 +100,11 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
|
|
||||||
- name: Build Linux/macOS
|
- name: Build for Linux/macOS
|
||||||
if: startsWith(matrix.os, 'windows-') != true
|
if: startsWith(matrix.os, 'windows-') != true
|
||||||
run: go build -i -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=`git describe --always --dirty` -X github.com/drakkan/sftpgo/version.date=`date -u +%FT%TZ`" -o sftpgo
|
run: go build -i -ldflags "-s -w -X github.com/drakkan/sftpgo/version.commit=`git describe --always --dirty` -X github.com/drakkan/sftpgo/version.date=`date -u +%FT%TZ`" -o sftpgo
|
||||||
|
|
||||||
- name: Build Windows
|
- name: Build for Windows
|
||||||
if: startsWith(matrix.os, 'windows-')
|
if: startsWith(matrix.os, 'windows-')
|
||||||
run: |
|
run: |
|
||||||
$GIT_COMMIT = (git describe --always --dirty) | Out-String
|
$GIT_COMMIT = (git describe --always --dirty) | Out-String
|
||||||
|
@ -114,7 +115,7 @@ jobs:
|
||||||
run: ./sftpgo initprovider
|
run: ./sftpgo initprovider
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Get version
|
- name: Get SFTPGo version
|
||||||
id: get_version
|
id: get_version
|
||||||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -135,7 +136,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
MATRIX_OS: ${{ matrix.os }}
|
MATRIX_OS: ${{ matrix.os }}
|
||||||
|
|
||||||
- name: Build REST API CLI
|
- name: Build REST API CLI for Windows
|
||||||
if: startsWith(matrix.os, 'windows-')
|
if: startsWith(matrix.os, 'windows-')
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip setuptools wheel
|
python -m pip install --upgrade pip setuptools wheel
|
||||||
|
@ -144,7 +145,7 @@ jobs:
|
||||||
pip install pyinstaller
|
pip install pyinstaller
|
||||||
pyinstaller --hidden-import="pkg_resources.py2_warn" --noupx --onefile examples\rest-api-cli\sftpgo_api_cli.py
|
pyinstaller --hidden-import="pkg_resources.py2_warn" --noupx --onefile examples\rest-api-cli\sftpgo_api_cli.py
|
||||||
|
|
||||||
- name: Prepare release Linux/macOS
|
- name: Prepare Release for Linux/macOS
|
||||||
if: startsWith(matrix.os, 'windows-') != true
|
if: startsWith(matrix.os, 'windows-') != true
|
||||||
run: |
|
run: |
|
||||||
mkdir -p output/{init,examples/rest-api-cli,sqlite}
|
mkdir -p output/{init,examples/rest-api-cli,sqlite}
|
||||||
|
@ -171,7 +172,7 @@ jobs:
|
||||||
SFTPGO_VERSION: ${{ steps.get_version.outputs.VERSION }}
|
SFTPGO_VERSION: ${{ steps.get_version.outputs.VERSION }}
|
||||||
OS: ${{ steps.get_os_name.outputs.OS }}
|
OS: ${{ steps.get_os_name.outputs.OS }}
|
||||||
|
|
||||||
- name: Prepare release Windows
|
- name: Prepare Release for Windows
|
||||||
if: startsWith(matrix.os, 'windows-')
|
if: startsWith(matrix.os, 'windows-')
|
||||||
run: |
|
run: |
|
||||||
mkdir output
|
mkdir output
|
||||||
|
@ -189,18 +190,19 @@ jobs:
|
||||||
SFTPGO_ISS_VERSION: ${{ steps.get_version.outputs.VERSION }}
|
SFTPGO_ISS_VERSION: ${{ steps.get_version.outputs.VERSION }}
|
||||||
SFTPGO_ISS_DOC_URL: https://github.com/drakkan/sftpgo/blob/${{ steps.get_version.outputs.VERSION }}/README.md
|
SFTPGO_ISS_DOC_URL: https://github.com/drakkan/sftpgo/blob/${{ steps.get_version.outputs.VERSION }}/README.md
|
||||||
|
|
||||||
- uses: actions/download-artifact@v2
|
- name: Download release upload URL
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: upload_url
|
name: upload_url
|
||||||
|
|
||||||
- name: Get upload URL
|
- name: Get release upload URL
|
||||||
id: upload_url
|
id: upload_url
|
||||||
run: |
|
run: |
|
||||||
URL=$(cat upload_url.txt)
|
URL=$(cat upload_url.txt)
|
||||||
echo "::set-output name=url::${URL}"
|
echo "::set-output name=url::${URL}"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Upload Release Linux/macOS
|
- name: Upload Linux/macOS Release
|
||||||
if: startsWith(matrix.os, 'windows-') != true
|
if: startsWith(matrix.os, 'windows-') != true
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
|
@ -211,7 +213,7 @@ jobs:
|
||||||
asset_name: sftpgo_${{ steps.get_version.outputs.VERSION }}_${{ steps.get_os_name.outputs.OS }}_x86_64.tar.xz
|
asset_name: sftpgo_${{ steps.get_version.outputs.VERSION }}_${{ steps.get_os_name.outputs.OS }}_x86_64.tar.xz
|
||||||
asset_content_type: application/x-xz
|
asset_content_type: application/x-xz
|
||||||
|
|
||||||
- name: Upload Release Windows
|
- 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
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -28,13 +28,12 @@ DefaultGroupName={#MyAppName}
|
||||||
LicenseFile={#MyAppDir}\LICENSE.txt
|
LicenseFile={#MyAppDir}\LICENSE.txt
|
||||||
OutputDir={#MyOutputDir}
|
OutputDir={#MyOutputDir}
|
||||||
OutputBaseFilename=sftpgo_windows_x86_64
|
OutputBaseFilename=sftpgo_windows_x86_64
|
||||||
Compression=lzma
|
|
||||||
SolidCompression=yes
|
SolidCompression=yes
|
||||||
WizardStyle=modern
|
WizardStyle=modern
|
||||||
ArchitecturesInstallIn64BitMode=x64
|
ArchitecturesInstallIn64BitMode=x64
|
||||||
PrivilegesRequired=admin
|
PrivilegesRequired=admin
|
||||||
ArchitecturesAllowed=x64
|
ArchitecturesAllowed=x64
|
||||||
MinVersion=6.1
|
MinVersion=10
|
||||||
VersionInfoVersion={#MyVersionInfo}
|
VersionInfoVersion={#MyVersionInfo}
|
||||||
|
|
||||||
[Languages]
|
[Languages]
|
||||||
|
|
Loading…
Reference in a new issue