Skip to content

Commit

Permalink
ci: migrate deploys to Github Actions
Browse files Browse the repository at this point in the history
ci: removed Travis CI config
  • Loading branch information
JaCzekanski committed Dec 21, 2020
1 parent e392943 commit 2fd5325
Show file tree
Hide file tree
Showing 13 changed files with 64 additions and 199 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '{branch}-{build}'
clone_depth: 1

environment:
PREMAKE_VERSION: 5.0.0-alpha14
PREMAKE_VERSION: 5.0.0-alpha15
SDL_VERSION: 2.0.10
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
Expand Down
16 changes: 6 additions & 10 deletions .ci/android/run-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,18 @@

# Setup signing
export BUILD_MODE="debug"
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
openssl aes-256-cbc -K $encrypted_7333c7dd5b15_key -iv $encrypted_7333c7dd5b15_iv -in android/avocado.keystore.enc -out android/avocado.keystore -d
if [[ -n "$GITHUB_HEAD_REF" ]]; then
gpg --quiet --yes --decrypt --passphrase="$KEYSTORE_KEY" --output android/avocado.keystore android/avocado.keystore.gpg
export BUILD_MODE="release"
fi

if [ "$GITHUB_ACTIONS" = "true" ]; then
export BUILD_MODE="debug"
fi

mkdir -p "$HOME/.ccache"

docker run \
-e CI=$CI \
-e BUILD_MODE=$BUILD_MODE \
-e keystore_password="$keystore_password" \
-v $(pwd):/home/build \
-e CI="$CI" \
-e BUILD_MODE="$BUILD_MODE" \
-e KEYSTORE_PASSWORD="$KEYSTORE_PASSWORD" \
-v "$(pwd)":/home/build \
-v "$HOME/.ccache":/root/.ccache \
avocadoemu/android \
/bin/bash -ex /home/build/.ci/android/build.sh
10 changes: 6 additions & 4 deletions .ci/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ else
fi

BRANCH=""
if [[ ! -z "${TRAVIS_BRANCH}" ]]; then
if [[ -n "${TRAVIS_BRANCH}" ]]; then
BRANCH=$TRAVIS_BRANCH
elif [[ ! -z "${APPVEYOR_REPO_BRANCH}" ]]; then
elif [[ -n "${APPVEYOR_REPO_BRANCH}" ]]; then
BRANCH=$APPVEYOR_REPO_BRANCH
else
echo "TRAVIS_BRANCH or APPVEYOR_REPO_BRANCH env not found"
elif [[ -n "${GITHUB_REF}" ]]; then
BRANCH=${GITHUB_REF##*/}
else
echo "TRAVIS_BRANCH, APPVEYOR_REPO_BRANCH or GITHUB_SHA env not found"
exit 3
fi

Expand Down
2 changes: 1 addition & 1 deletion .ci/linux/run-container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mkdir -p "$HOME/.ccache"

docker run \
-e CI=$CI \
-v $(pwd):/home/build \
-v "$(pwd)":/home/build \
-v "$HOME/.ccache":/root/.ccache \
avocadoemu/linux-clang$CLANG_VERSION \
/bin/bash -ex /home/build/.ci/linux/build.sh
2 changes: 1 addition & 1 deletion .ci/macos/install-dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -ex

export PREMAKE_VERSION="5.0.0-alpha14"
export PREMAKE_VERSION="5.0.0-alpha15"

# Download Premake5
wget -nv https://github.com/premake/premake-core/releases/download/v$PREMAKE_VERSION/premake-$PREMAKE_VERSION-macosx.tar.gz
Expand Down
82 changes: 0 additions & 82 deletions .ci/notify-discord.sh

This file was deleted.

55 changes: 45 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ jobs:

- name: Build
run: .ci/linux/run-container.sh 6


- uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.WEBHOOK_URL }}

linux_clang8:
name: "Linux Clang8"
runs-on: ubuntu-18.04
Expand All @@ -41,11 +46,19 @@ jobs:
- name: Build
run: .ci/linux/run-container.sh 8

- name: Upload
- name: Upload Github
uses: kittaakos/upload-artifact-as-is@v0
with:
path: upload/


- name: Upload Builds
run: .ci/deploy.sh ${{ secrets.DEPLOY_KEY }} upload/*

- uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.WEBHOOK_URL }}

android:
name: "Android"
runs-on: ubuntu-18.04
Expand All @@ -64,12 +77,23 @@ jobs:

- name: Build
run: .ci/android/run-container.sh
env:
KEYSTORE_KEY: ${{ secrets.KEYSTORE_KEY }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}

- name: Upload
- name: Upload Github
uses: kittaakos/upload-artifact-as-is@v0
with:
with:
path: upload/


- name: Upload Builds
run: .ci/deploy.sh ${{ secrets.DEPLOY_KEY }} upload/*

- uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.WEBHOOK_URL }}

macos:
name: "macOS"
runs-on: macOS-10.15
Expand All @@ -86,15 +110,26 @@ jobs:
key: ${{ runner.os }}-ccache-${{ github.sha }}
restore-keys: ${{ runner.os }}-ccache-

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '11.7'

- name: Install
run: .ci/macos/install-dependencies.sh

- name: Build
run: .ci/macos/build.sh
- name: Upload

- name: Upload Github
uses: kittaakos/upload-artifact-as-is@v0
with:
with:
path: upload/


- name: Upload Builds
run: .ci/deploy.sh ${{ secrets.DEPLOY_KEY }} upload/*

- uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.WEBHOOK_URL }}
# TODO: Add Windows
51 changes: 0 additions & 51 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ Full list: [Avocado Builds](https://avocado-builds.czekanski.info)

Build | Status | Download
--------|--------|---------
Linux | [![Build Status](https://avocado-builds.czekanski.info/status/linux64)](https://travis-ci.org/JaCzekanski/Avocado) | [develop](https://avocado-builds.czekanski.info/latest/linux64)
macOS | [![Build Status](https://avocado-builds.czekanski.info/status/macos)](https://travis-ci.org/JaCzekanski/Avocado) | [develop](https://avocado-builds.czekanski.info/latest/macos)
Android | [![Build Status](https://avocado-builds.czekanski.info/status/android)](https://travis-ci.org/JaCzekanski/Avocado) | [develop](https://avocado-builds.czekanski.info/latest/android)
Linux | [![Build Status](https://avocado-builds.czekanski.info/status/linux64)](https://github.com/JaCzekanski/Avocado/actions) | [develop](https://avocado-builds.czekanski.info/latest/linux64)
macOS | [![Build Status](https://avocado-builds.czekanski.info/status/macos)](https://github.com/JaCzekanski/Avocado/actions) | [develop](https://avocado-builds.czekanski.info/latest/macos)
Android | [![Build Status](https://avocado-builds.czekanski.info/status/android)](https://github.com/JaCzekanski/Avocado/actions) | [develop](https://avocado-builds.czekanski.info/latest/android)
Windows 64-bit, Visual Studio 2019 | [![Build status](https://avocado-builds.czekanski.info/status/windows64)](https://ci.appveyor.com/project/JaCzekanski/avocado/branch/develop) | **[develop](https://avocado-builds.czekanski.info/latest/windows64)**
Windows 32-bit, Visual Studio 2019 | [![Build status](https://avocado-builds.czekanski.info/status/windows32)](https://ci.appveyor.com/project/JaCzekanski/avocado/branch/develop) | [develop](https://avocado-builds.czekanski.info/latest/windows32)
Windows 64-bit, Visual Studio 2017 | [![Build status](https://ci.appveyor.com/api/projects/status/h1cs3bj1vhskjxgx/branch/develop?svg=true)](https://ci.appveyor.com/project/JaCzekanski/avocado/branch/develop) |
Expand Down
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply plugin: 'com.android.application'

def signingPassword = System.getenv("keystore_password")
def signingPassword = System.getenv("KEYSTORE_PASSWORD")
def signingEnabled = signingPassword != null
println "App signing: $signingEnabled"

Expand Down
Binary file removed android/avocado.keystore.enc
Binary file not shown.
Binary file added android/avocado.keystore.gpg
Binary file not shown.
35 changes: 0 additions & 35 deletions main.yml

This file was deleted.

0 comments on commit 2fd5325

Please sign in to comment.