Skip to content

Commit

Permalink
Switch from Travis CI to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 committed Jun 20, 2021
1 parent b4c97b7 commit 45c0398
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 50 deletions.
13 changes: 13 additions & 0 deletions .github/webhook.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
set -e

# Report unnamed symbols
content="$(tools/unnamed.py -r . pokeyellow.sym | head)"

curl -H 'Content-Type: application/json' -X POST "$DISCORD_WEBHOOK_URL" -d@- << EOF
{
"username": "OK",
"avatar_url": "https://i.imgur.com/38BQHdd.png",
"content": "\`\`\`$(echo "$content" | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g')\`\`\`"
}
EOF
45 changes: 45 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI

on:
push:
branches: [ master ]
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master

- name: Checkout rgbds
uses: actions/checkout@master
with:
path: rgbds
ref: v0.5.1
repository: gbdev/rgbds

- name: Install rgbds
working-directory: rgbds
run: |
sudo make install
- name: Remove rgbds
run: |
rm -rf rgbds
- name: Compare
run: |
make DEBUG=1 -j$(nproc) compare
if ! git diff-index --quiet HEAD --; then
echo 'Uncommitted changes detected:'
git diff-index HEAD --
return 1
fi
- name: Discord webhook
if: ${{ github.event_name == 'push' && github.repository_owner == 'pret' }}
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
run: |
.github/webhook.sh
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

15 changes: 0 additions & 15 deletions .travis/webhook.sh

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Pokémon Yellow [![Build Status][travis-badge]][travis]
# Pokémon Yellow [![Build Status][ci-badge]][ci]

This is a disassembly of Pokémon Yellow.

Expand Down Expand Up @@ -36,5 +36,5 @@ Other disassembly projects:
[pokeemerald]: https://github.com/pret/pokeemerald
[discord]: https://discord.gg/d5dubZ3
[irc]: https://kiwiirc.com/client/irc.freenode.net/?#pret
[travis]: https://travis-ci.org/pret/pokeyellow
[travis-badge]: https://travis-ci.org/pret/pokeyellow.svg?branch=master
[ci]: https://github.com/pret/pokeyellow/actions
[ci-badge]: https://github.com/pret/pokeyellow/actions/workflows/main.yml/badge.svg

0 comments on commit 45c0398

Please sign in to comment.