-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upload testing packages to public SFTPPlus instance for green builds. **Drive-by changes**: * Updated `MACOSX_DEPLOYMENT_TARGET` to `10.13` to match `CFLAGS`. * Use the standard short git ID for packages. * Added `.gitattributes` to fix #3. * Added ngrok-based debugging for Windows runners. * Removed malfunctioning `skip-ci` steps. * Removed the uploading of artifacts.
- Loading branch information
Showing
7 changed files
with
91 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Prevent the default "Windows-style checkouts" that leads to mysterious | ||
# failures when cloning with default Git settings on Windows, e.g. | ||
# https://github.com/chevah/pythia/issues/3. More on this at | ||
# https://github.com/actions/checkout/issues/135#issuecomment-613329879. | ||
* -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,10 @@ on: | |
pull_request: | ||
branches: [ main ] | ||
|
||
# Set to 'yes' to open a tunnel to GitHub's VMs through ngrok/tmate on failures. | ||
# Also increase timeout-minutes for the relevant OS when debugging remotely. | ||
env: | ||
TMATE_DEBUG: 'no' | ||
CHEVAH_DEBUG: 'no' | ||
|
||
jobs: | ||
windows: | ||
|
@@ -38,29 +40,52 @@ jobs: | |
with: | ||
fetch-depth: 2 | ||
|
||
# Skip CI for commits with a message containing the skip-ci string. | ||
- name: Fail on skip-ci | ||
if: ${{ github.event.after }} | ||
run: git log -1 --pretty=format:"%s" ${{ toJSON(github.event.after) }} | grep -v 'skip-ci' | ||
|
||
# Explicitly run our scripts with Bash, not PowerShell (GitHub's default). | ||
- name: Detect current OS | ||
run: bash ./brink.sh detect_os | ||
|
||
- name: Build Python | ||
run: bash ./pythia build | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: pythia-${{ matrix.runs-on }} | ||
path: dist/**/*.tar.gz | ||
|
||
- name: Test Python | ||
run: bash ./pythia test | ||
|
||
# To use an RSA key with SFTPPlus, install upstream OpenSSH package, | ||
# which is more finicky in regards to file permissions. | ||
# Beware the commands in this step run under PowerShell. | ||
- name: Prepare SFTP upload | ||
run: | | ||
mkdir -p ~/.ssh/ | ||
touch priv_key | ||
icacls .\priv_key /inheritance:r | ||
icacls .\priv_key /grant:r runneradmin:"(F)" | ||
echo "${{ secrets.SFTPPLUS_BIN_PRIV_KEY }}" > priv_key | ||
echo "${{ secrets.SFTPPLUS_BIN_HOST_KEY }}" > ~/.ssh/known_hosts | ||
choco install --yes --no-progress openssh | ||
# The publish_dist_sftp_batch file is generated by the build process. | ||
- name: Upload testing package | ||
run: | | ||
C:\Progra~1\OpenSSH-Win64\sftp.exe -b publish_dist_sftp_batch -i priv_key -o StrictHostKeyChecking=yes [email protected] | ||
echo "Package uploaded to https://bin.chevah.com:20443/testing/python/" | ||
# Per https://github.com/nelsonjchen/reverse-rdp-windows-github-actions, | ||
# but using the Ngrok token as password for the runnneradmin user. | ||
- name: Ngrok debugging on failure | ||
if: failure() && env.CHEVAH_DEBUG == 'yes' | ||
env: | ||
NGROK_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} | ||
run: | | ||
choco install --yes --no-progress ngrok | ||
ngrok.exe authtoken $env:NGROK_TOKEN | ||
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value 0 | ||
Enable-NetFirewallRule -DisplayGroup "Remote Desktop" | ||
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication" -Value 1 | ||
Set-LocalUser -Name "runneradmin" -Password (ConvertTo-SecureString -AsPlainText "$env:NGROK_TOKEN" -Force) | ||
ngrok.exe tcp 3389 | ||
linux: | ||
# 'Fail on skip-ci' action doesn't work for this runner (on 2020.10.16). | ||
runs-on: ${{ matrix.runs-on }} | ||
strategy: | ||
fail-fast: false | ||
|
@@ -73,10 +98,6 @@ jobs: | |
with: | ||
fetch-depth: 2 | ||
|
||
- name: Fail on skip-ci | ||
if: ${{ github.event.after }} | ||
run: git log -1 --pretty=format:"%s" ${{ toJSON(github.event.after) }} | grep -v 'skip-ci' | ||
|
||
- name: Install required packages | ||
run: sudo apt-get install libncurses5-dev | ||
|
||
|
@@ -86,17 +107,22 @@ jobs: | |
- name: Build Python | ||
run: bash ./pythia build | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: pythia-${{ matrix.runs-on }} | ||
path: dist/**/*.tar.gz | ||
|
||
- name: Test Python | ||
run: bash ./pythia test | ||
|
||
- name: Upload testing package | ||
run: | | ||
mkdir -pv ~/.ssh/ | ||
touch priv_key | ||
chmod 600 priv_key | ||
echo "${{ secrets.SFTPPLUS_BIN_PRIV_KEY }}" > priv_key | ||
echo "${{ secrets.SFTPPLUS_BIN_HOST_KEY }}" > ~/.ssh/known_hosts | ||
sftp -b publish_dist_sftp_batch -i priv_key -o StrictHostKeyChecking=yes [email protected] | ||
echo "Package uploaded to https://bin.chevah.com:20443/testing/python/" | ||
# If one of the above steps fails, fire up tmate for remote debugging. | ||
- name: Tmate debug on failure | ||
if: failure() && env.TMATE_DEBUG == 'yes' | ||
if: failure() && env.CHEVAH_DEBUG == 'yes' | ||
uses: mxschmitt/action-tmate@v2 | ||
|
||
|
||
|
@@ -109,10 +135,6 @@ jobs: | |
with: | ||
fetch-depth: 2 | ||
|
||
- name: Fail on skip-ci | ||
if: ${{ github.event.after }} | ||
run: git log -1 --pretty=format:"%s" ${{ toJSON(github.event.after) }} | grep -v 'skip-ci' | ||
|
||
- name: Detect current OS | ||
run: ./brink.sh detect_os | ||
|
||
|
@@ -126,21 +148,26 @@ jobs: | |
- name: Build Python | ||
run: bash ./pythia build | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: pythia-macos | ||
path: dist/**/*.tar.gz | ||
|
||
- name: Test Python | ||
run: bash ./pythia test | ||
|
||
- name: Upload testing package | ||
run: | | ||
mkdir -pv ~/.ssh/ | ||
touch priv_key | ||
chmod 600 priv_key | ||
echo "${{ secrets.SFTPPLUS_BIN_PRIV_KEY }}" > priv_key | ||
echo "${{ secrets.SFTPPLUS_BIN_HOST_KEY }}" > ~/.ssh/known_hosts | ||
sftp -b publish_dist_sftp_batch -i priv_key -o StrictHostKeyChecking=yes [email protected] | ||
echo "Package uploaded to https://bin.chevah.com:20443/testing/python/" | ||
# Fix back Homebrew, to make everything functional for tmate debugging. | ||
- name: Unhack Homebrew | ||
if: failure() && env.TMATE_DEBUG == 'yes' | ||
if: failure() && env.CHEVAH_DEBUG == 'yes' | ||
run: | | ||
sudo chmod a+r /usr/local/opt/libffi/lib/libffi.7.dylib | ||
sudo find /usr/local -name 'libintl*' -exec chmod a-r {} + | ||
- name: Tmate debug on failure | ||
if: failure() && env.TMATE_DEBUG == 'yes' | ||
if: failure() && env.CHEVAH_DEBUG == 'yes' | ||
uses: mxschmitt/action-tmate@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
3b463ef64397326ffd5f20009be6c1304a3bd8646e5bf05c0a8be5ed4aabe7b0a5a6133e962f538292e6290a04fbe07b1caa6c09c54d012b0d07b7f025772921 Python-3.8.6.amd64.zip | ||
fb270ce1f1d0bcb95e6c192a35dda276005f74e3c9d89a3a8f799296e9a1db925155437be977a3f3181c25eb522025895563d2333bc6606353bc024b51379107 Python-3.8.6.win32.zip | ||
3b463ef64397326ffd5f20009be6c1304a3bd8646e5bf05c0a8be5ed4aabe7b0a5a6133e962f538292e6290a04fbe07b1caa6c09c54d012b0d07b7f025772921 *Python-3.8.6.amd64.zip | ||
fb270ce1f1d0bcb95e6c192a35dda276005f74e3c9d89a3a8f799296e9a1db925155437be977a3f3181c25eb522025895563d2333bc6606353bc024b51379107 *Python-3.8.6.win32.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters