diff --git a/.ci/bootstrap.bat b/.ci/bootstrap.bat index 6f0923311..9a4a110f6 100644 --- a/.ci/bootstrap.bat +++ b/.ci/bootstrap.bat @@ -1,3 +1,4 @@ +@ECHO OFF SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION cd internal\c diff --git a/.ci/build.bat b/.ci/build.bat new file mode 100644 index 000000000..1600a5def --- /dev/null +++ b/.ci/build.bat @@ -0,0 +1,17 @@ +SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION + +echo Compiling new QB64 +echo From git %APPVEYOR_REPO_COMMIT:~0,7% > internal\version.txt +qb64_bootstrap.exe -x source\qb64.bas -o qb64.exe +IF ERRORLEVEL 1 exit /b 1 + +del qb64_bootstrap.exe +del /q /s secure-file +del /q /s internal\source\* +move internal\temp\* internal\source\ +del /q /s internal\c\libqb\*.o >nul 2>nul +del /q /s internal\c\libqb\*.a >nul 2>nul +del /q /s internal\c\parts\*.o >nul 2>nul +del /q /s internal\c\parts\*.a >nul 2>nul +cd internal\source +del /q /s debug_* recompile_* diff --git a/.ci/common-exclusion.list b/.ci/common-exclusion.list index 7237b10ac..4742929fe 100644 --- a/.ci/common-exclusion.list +++ b/.ci/common-exclusion.list @@ -8,4 +8,3 @@ appveyor.yml setup_win.bat qb64/internal/c/mingw32 qb64/internal/c/mingw64 -autosync.sh diff --git a/.ci/compile.bat b/.ci/compile.bat index a0ab47ec6..6d87f87a4 100644 --- a/.ci/compile.bat +++ b/.ci/compile.bat @@ -1,3 +1,4 @@ +@ECHO OFF SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION echo From git %GITHUB_SHA:~0,7% > internal\version.txt diff --git a/.ci/deploy.bat b/.ci/deploy.bat new file mode 100644 index 000000000..9b97c134c --- /dev/null +++ b/.ci/deploy.bat @@ -0,0 +1,8 @@ +@ECHO OFF +SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION + +cd .. +set filename=qb64_%DATE:~10,4%-%DATE:~7,2%-%DATE:~4,2%-%TIME:~0,2%-%TIME:~3,2%-%TIME:~6,2%_%GITHUB_SHA:~0,7%_win-%PLATFORM%.7z +7z a '-xr@qb64\.ci\common-exclusion.list' '-xr@qb64\.travis\win-exclusion.list' %filename% qb64 +scp %filename% remote-server:autobuilds/development/ + diff --git a/.ci/win-exclusion.list b/.ci/win-exclusion.list new file mode 100644 index 000000000..7d5615b6f --- /dev/null +++ b/.ci/win-exclusion.list @@ -0,0 +1,3 @@ +setup_lnx.sh +setup_osx.command +qb64_start_osx.command diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml index 4232659b2..6e41809c7 100644 --- a/.github/workflows/run.yml +++ b/.github/workflows/run.yml @@ -74,4 +74,19 @@ jobs: run: .ci/bootstrap.bat - name: Compile run: .ci/compile.bat + - name: Set deployment SSH key + if: github.event_name == 'push' + uses: shimataro/ssh-key-action@v1 + with: + private-key: ${{ secrets.SSH_KEY }} + public-key: ${{ secrets.SSH_KEY_PUBLIC }} + known-hosts: "qb64.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtmlTks7NPQHwvQiW+P2P8voWXfwYD+EuU39ERiaVw5g/lG/6pU1SKdrRBg2AtaPToPgK/nQyaid3sO2aWO00ixiKB3JPJoVp3nRY8YFi/AtVtVot/xh6+39fjP59tMCnMCbXTKjyMWL0kkwzd+OT8wryRZ/EgjK3vk9UGYzxKSr8G/KKV3GBDrJOdpHT2gNUcDFg6HSMvM860ZOF8n6jKRwp7MM0SpptufuQDgj/LhHcqQtFOqkhW9HXNmZR7IPchb5tsUubbPdSLu043B0ir2x5sCkK9V+inZExPg7KwIZ0yRsSv5esgLaBdyf1UToU3LU4ZM1hWjcJsp2fCBRkhw==" + config: | + Host remote-server + HostName qb64.org + User m6rosupy1q2t + - name: Package and deploy + if: github.event_name == 'push' + run: .ci/deploy.bat + diff --git a/autosync.sh b/autosync.sh deleted file mode 100755 index e2c624efc..000000000 --- a/autosync.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# This script reproduces any commits on upstream to the given remotes, but only on the given branches. -# It is intended to be run via a cron job or similar. -# The merge is --ff-only, so the target branches must not have anything else adding commits to them. - -set -e -cd ~/qb64 - -# Adding a new branch/remote? git checkout -b $remote-$branch $remote/$branch to create a new local. -BRANCHES='development' -REMOTES='origin fellippe qb64team' - -git fetch upstream - -for branch in $BRANCHES; do - for remote in $REMOTES; do - git checkout -q $remote-$branch - git merge -q --ff-only upstream/$branch - done -done - -for remote in $REMOTES; do - refspecs= - for branch in $BRANCHES; do - refspecs="$refspecs $remote-$branch:$branch" - done - git push -q $remote $refspecs -done