switch to github actions

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7225 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2020-10-13 17:38:40 +00:00
parent 4c29550d04
commit 39b528a071
3 changed files with 67 additions and 37 deletions

66
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,66 @@
name: CI
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
os: [ubuntu-18.04, macos-10.15, windows-2019]
log: [yes, no]
include:
- nightly: nightly
os: windows-2019
log: no
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Brew Dependencies
run: |
brew install scons mingw-w64 zlib
curl -sLo cppunit.rb "https://sourceforge.net/p/nsis/code/HEAD/tree/web-scripts/trunk/cppunit.rb?format=raw"
brew install -s cppunit.rb
if: startsWith(matrix.os, 'macos')
- name: Apt Dependencies
run: sudo DEBIAN_FRONTEND=noninteractive apt-get install -y scons g++-mingw-w64-i686 binutils-mingw-w64-i686 zlib1g-dev libcppunit-dev
if: startsWith(matrix.os, 'ubuntu')
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: '3.8'
if: startsWith(matrix.os, 'windows')
- name: Choco Dependencies
run: |
curl -sLo cppunit-msvc-1.12.1.exe https://downloads.sourceforge.net/project/cppunit-msvc/cppunit-msvc-1.12.1.exe
$arguments = "/S /D=$HOME\cppunit"
Start-Process ./cppunit-msvc-1.12.1.exe $arguments -NoNewWindow -Wait
pip install scons
choco install html-help-workshop
echo "${Env:ProgramFiles(x86)}\HTML Help Workshop" >> $Env:GITHUB_PATH
if: startsWith(matrix.os, 'windows')
- name: Zlib Dependency
run: |
curl -sLo $HOME/zlib.zip "https://downloads.sourceforge.net/project/libpng/zlib/1.2.8/zlib128-dll.zip?r=&ts=1403402496&use_mirror=hivelocity"
mkdir $HOME/zlib
unzip $HOME/zlib.zip -d $HOME/zlib
- name: Build
run: |
scons ZLIB_W32=$HOME/zlib SKIPUTILS="NSIS Menu" NSIS_CONFIG_LOG=${{ matrix.log }} test dist-zip
if: "!startsWith(matrix.os, 'windows')"
- name: Build (Windows)
run: |
scons ZLIB_W32=$HOME/zlib SKIPUTILS="NSIS Menu" NSIS_CONFIG_LOG=${{ matrix.log }} APPEND_CPPPATH=$HOME/cppunit/include APPEND_LIBPATH=$HOME/cppunit/lib/release-win32 test dist
if: startsWith(matrix.os, 'windows')
- name: Config Errors
if: ${{ failure() }}
run: cat config.log
- name: Deploy
run: |
echo https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID > build.log
#Compress-Archive -Path build.log -DestinationPath nsis-*.zip -Update
echo $Env:DEPLOY_KEY > $HOME/deploy_key
ssh -oStrictHostKeyChecking=no -o "BatchMode yes" -i $HOME/deploy_key -T kichik,nsis@shell.sourceforge.net create
cat nsis-*.zip | ssh -oStrictHostKeyChecking=no -o "BatchMode yes" -i $HOME/deploy_key kichik,nsis@shell.sourceforge.net /home/project-web/nsis/bin/nightly-deploy.sh
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
if: matrix.nightly == 'nightly' && github.ref == 'refs/heads/master'

View file

@ -1,36 +0,0 @@
language: cpp
compiler:
- gcc
os:
- linux
- osx
dist: trusty
before_install:
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then sudo apt-get install scons mingw32 mingw32-binutils zlib1g-dev libcppunit-dev; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew update; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew install https://sourceforge.net/p/nsis/code/HEAD/tree/web-scripts/trunk/cppunit.rb?format=raw; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew install scons mingw-w64 zlib; fi
install:
- wget -O /tmp/zlib.zip "https://downloads.sourceforge.net/project/libpng/zlib/1.2.8/zlib128-dll.zip?r=&ts=1403402496&use_mirror=hivelocity"
- mkdir /tmp/zlib
- unzip /tmp/zlib.zip -d /tmp/zlib
script:
- set -o pipefail && scons ZLIB_W32=/tmp/zlib SKIPUTILS="NSIS Menu" NSIS_CONFIG_LOG=$CFG_LOG test dist-zip | tee build.log
- zip nsis-*.zip build.log
env:
- CFG_LOG=yes
- CFG_LOG=no
deploy:
provider: script
skip_cleanup: true
script: echo $DEPLOY_KEY | base64 -d > deploy_key && chmod 600 deploy_key && ssh -o "BatchMode yes" -i deploy_key -T kichik,nsis@shell.sourceforge.net create && cat nsis-*.zip | ssh -o "BatchMode yes" -i deploy_key kichik,nsis@shell.sourceforge.net /home/project-web/nsis/bin/nightly-deploy.sh
on:
branch: master
repo: kichik/nsis
condition: "$CFG_LOG = no && $TRAVIS_OS_NAME = linux"
after_deploy: rm -f deploy_key
addons:
ssh_known_hosts: shell.sourceforge.net
notifications:
slack:
secure: Q61wSM9pOKiRp3WDNinMkZd+HWp6BFe+TlZDKoJgZJstMIT48TtkAaVmqW2h4HXtNxP9HvD1vzXqWGqGMG8vIO6hlQO5Rm/ruVa/rfb1kxLfD/dv+g/63ZloF3QmKKK++xeYKVNmPRVi7aSFjpx1wa+eG4rYPf0frc5XSFDuhVQ=

View file

@ -1,6 +1,6 @@
# NSIS # NSIS
[![Build Status](https://travis-ci.org/kichik/nsis.svg?branch=master)](https://travis-ci.org/kichik/nsis) [![CI](https://github.com/kichik/nsis/workflows/CI/badge.svg)](https://github.com/kichik/nsis/actions)
NSIS (Nullsoft Scriptable Install System) is a professional open source system to create Windows installers. It is designed to be as small and flexible as possible and is therefore very suitable for internet distribution. NSIS (Nullsoft Scriptable Install System) is a professional open source system to create Windows installers. It is designed to be as small and flexible as possible and is therefore very suitable for internet distribution.