diff --git a/.github/actions/creds.tar.gpg b/.github/actions/creds.tar.gpg new file mode 100644 index 00000000..c6170450 Binary files /dev/null and b/.github/actions/creds.tar.gpg differ diff --git a/.github/actions/decrypt.sh b/.github/actions/decrypt.sh new file mode 100644 index 00000000..7fed09ff --- /dev/null +++ b/.github/actions/decrypt.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +mydir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + +credsfile="${gampath}/creds.tar" +gpg --quiet --batch --yes --decrypt --passphrase="${PASSPHRASE}" \ + --output "${credsfile}" "${mydir}/creds.tar.gpg" + +tar xf "${credsfile}" --directory "${gampath}" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0340fc90..81e60bf5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,14 +23,39 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, macos-10.15, windows-2016, windows-2019] include: - - goal: "test" + - os: ubuntu-16.04 + jid: 1 + goal: "build" + - os: ubuntu-18.04 + jid: 2 + goal: "build" + - os: ubuntu-20.04 + jid: 3 + goal: "build" + - os: macos-10.15 + jid: 4 + goal: "build" + - os: windows-2019 + jid: 5 + goal: "build" + PLATFORM: "x86_64" + - os: windows-2019 + jid: 6 + goal: "build" + PLATFORM: "x86" + - os: ubuntu-20.04 + goal: "test" python: "3.6" - - goal: "test" + jid: 7 + - os: ubuntu-20.04 + goal: "test" python: "3.7" - - goal: "test" + jid: 8 + - os: ubuntu-20.04 + goal: "test" python: "3.8" + jid: 9 steps: @@ -41,12 +66,12 @@ jobs: - name: Cache multiple paths uses: actions/cache@v2 - if: matrix.goal == 'test' + if: matrix.goal != 'test' with: path: | ~/python ~/ssl - key: ${{ matrix.os }} + key: ${{ matrix.os }}-${ matrix.jid }} - name: Build and install Python/OpenSSL if: steps.cache-primes.outputs.cache-hit != 'true' @@ -87,7 +112,7 @@ jobs: $gam version extended $gam version | grep runner # runner should be part of the path (not /tmp or such) - - name: Basic Tests - builds jobs only + - name: Basic Tests - build jobs only run: | cd src # Check Python version @@ -100,7 +125,11 @@ jobs: openssl_line=($vline) this_openssl=${openssl_line[1]} $python tools/a_atleast_b.py $this_openssl $MIN_OPENSSL_VERSION - # Check TLS version in use - $gam version extended | grep TLSv1\.[23] # Builds should default TLS 1.2 or 1.3 to Google - GAM_TLS_MIN_VERSION=TLSv1_2 $gam version extended location tls-v1-0.badssl.com:1010; [[ $? == 3 ]] # expect fail since server doesn't support our TLS version + - name: Live API tests - build jobs only + run: | + bash .github/actions/decrypt.sh + cd src + $gam oauth info + $gam info user + $gam