mirror of https://github.com/pret/pokeemerald.git
Replace Travis CI with Github workflow
This commit is contained in:
parent
94a883d600
commit
c05f529a19
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
# Only run this script if it's the master branch build.
|
||||
if [[ "$TRAVIS_BRANCH" != "master" || "$TRAVIS_PULL_REQUEST" != "false" ]]; then
|
||||
if [[ "$GITHUB_REF" != "refs/heads/master" || "$GITHUB_EVENT_NAME" != "false" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
@ -13,4 +13,4 @@ if [ ! -f $map_file ]; then
|
|||
fi
|
||||
|
||||
output=$(perl $(dirname "$0")/calcrom.pl $build_name.map | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g')
|
||||
curl -d "{\"username\": \"$CALCROM_DISCORD_WEBHOOK_USERNAME\", \"avatar_url\": \"$CALCROM_DISCORD_WEBHOOK_AVATAR_URL\", \"content\":\"\`\`\`$build_name progress:\\n$output\`\`\`\"}" -H "Content-Type: application/json" -X POST $CALCROM_DISCORD_WEBHOOK_URL
|
||||
curl -d "{\"username\": \"$CALCROM_DISCORD_WEBHOOK_USERNAME\", \"avatar_url\": \"$CALCROM_DISCORD_WEBHOOK_AVATAR_URL\", \"content\":\"\`\`\`$build_name progress:\\n$output\`\`\`\"}" -H "Content-Type: application/json" -X POST "$CALCROM_DISCORD_WEBHOOK_URL"
|
|
@ -0,0 +1,40 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
CALCROM_DISCORD_WEBHOOK_USERNAME: ${{ secrets.CALCROM_DISCORD_WEBHOOK_USERNAME }}
|
||||
CALCROM_DISCORD_WEBHOOK_AVATAR_URL: ${{ secrets.CALCROM_DISCORD_WEBHOOK_AVATAR_URL }}
|
||||
CALCROM_DISCORD_WEBHOOK_URL: ${{ secrets.CALCROM_DISCORD_WEBHOOK_URL }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: Install binutils
|
||||
run: sudo apt install gcc-arm-none-eabi binutils-arm-none-eabi
|
||||
# build-essential, git, and libpng-dev are already installed
|
||||
# gcc-arm-none-eabi is only needed for the modern build
|
||||
# as an alternative to dkP
|
||||
|
||||
- name: Install agbcc
|
||||
run: |
|
||||
git clone https://github.com/pret/agbcc.git
|
||||
cd agbcc
|
||||
./build.sh
|
||||
./install.sh ../
|
||||
|
||||
- name: Compare
|
||||
run: make -j${nproc} compare
|
||||
|
||||
- name: Modern
|
||||
run: make -j${nproc} modern
|
||||
|
||||
- name: Webhook
|
||||
run: sh .github/calcrom/webhook.sh pokeemerald
|
39
.travis.yml
39
.travis.yml
|
@ -1,39 +0,0 @@
|
|||
language: generic
|
||||
dist: bionic
|
||||
sudo: false
|
||||
env:
|
||||
global:
|
||||
- DEVKITPRO=$HOME
|
||||
- DEVKITARM=$DEVKITPRO/devkitARM
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- gcc-multilib
|
||||
- linux-libc-dev
|
||||
cache:
|
||||
apt: true
|
||||
install:
|
||||
- pushd $HOME
|
||||
- travis_retry wget https://github.com/devkitPro/buildscripts/releases/download/devkitARM_r52/devkitARM_r52-linux.tar.xz
|
||||
- tar xJf devkitARM*.tar.xz
|
||||
- travis_retry wget https://github.com/devkitPro/devkitarm-rules/releases/download/v1.0.0/devkitarm-rules-1.0.0.tar.xz
|
||||
- tar xJf devkitarm-rules-*.tar.xz -C $DEVKITARM
|
||||
- travis_retry git clone https://github.com/pret/agbcc.git
|
||||
- cd agbcc && ./build.sh && ./install.sh $TRAVIS_BUILD_DIR
|
||||
- popd
|
||||
matrix:
|
||||
include:
|
||||
- os: linux
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-7
|
||||
env: _="Build"
|
||||
script:
|
||||
- make -j2 tools CXX=g++-7
|
||||
- make -j2 compare
|
||||
- make -j2 modern
|
||||
after_success:
|
||||
- .travis/calcrom/webhook.sh pokeemerald
|
Loading…
Reference in New Issue