Merge pull request #28 from pond3r/dev/ci

initial integration with google cloud builder for ci.
This commit is contained in:
Tony Cannon
2019-10-23 19:35:53 -07:00
committed by GitHub
4 changed files with 55 additions and 0 deletions

14
ci/build_windows.sh Normal file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
set -x
WORKSPACE="workspace-${RANDOM}"
AGENT_IP="$(gcloud compute instances describe ggpo-ci-build-win-01 --zone=us-central1-a --format='get(networkInterfaces[0].accessConfigs.natIP)')"
SSH="ssh -o StrictHostKeyChecking=no"
tar -cvf ggpo.tar . &> /dev/null
${SSH} ponder@${AGENT_IP} "mkdir C:\\workspace\\${WORKSPACE}"
scp ggpo.tar "ponder@${AGENT_IP}:/workspace/${WORKSPACE}"
${SSH} ponder@${AGENT_IP} "cd C:\\workspace\\${WORKSPACE} && tar -xvf ggpo.tar && ci\\build_windows_agent.cmd"
${SSH} ponder@${AGENT_IP} "rmdir /q/s C:\\workspace\\${WORKSPACE}"
rm ggpo.tar

View File

@@ -0,0 +1,11 @@
cmake -G "Visual Studio 16 2019" -A x64 -B build -DBUILD_SHARED_LIBS=off
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat"
echo on
devenv.exe "build\GGPO.sln" /build Release /out release.log
type release.log
devenv.exe "build\GGPO.sln" /build Debug /out debug.log
type debug.log

BIN
ci/id_rsa.enc Normal file

Binary file not shown.

30
cloudbuild.yaml Normal file
View File

@@ -0,0 +1,30 @@
# Decrypt the file containing the key
steps:
- name: 'gcr.io/cloud-builders/gcloud'
args:
- kms
- decrypt
- --ciphertext-file=./ci/id_rsa.enc
- --plaintext-file=/root/.ssh/id_rsa
- --location=global
- --keyring=ggpo-ci-keyring
- --key=buildagent-key
volumes:
- name: 'ssh'
path: /root/.ssh
- name: 'gcr.io/cloud-builders/git'
entrypoint: bash
args:
- '-c'
- |
chmod 600 /root/.ssh/id_rsa
volumes:
- name: 'ssh'
path: /root/.ssh
- name: 'gcr.io/cloud-builders/git'
entrypoint: bash
args:
- ./ci/build_windows.sh
volumes:
- name: 'ssh'
path: /root/.ssh