diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-06-19 22:18:38 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2021-06-19 22:18:38 -0400 |
commit | c4f92950a6d4f242b7ff5102f56a36082a5f3bbb (patch) | |
tree | dd354df133a8ac31339e1a3587b7bbf79ce899d7 | |
parent | 3eda24dc473813e44e55afb1cf8f57a354fb7a10 (diff) |
Switch from Travis CI to GitHub Actions
-rw-r--r-- | .github/workflows/main.yml | 59 | ||||
-rw-r--r-- | .travis.yml | 34 | ||||
-rwxr-xr-x | .travis/upload_symbols.sh | 12 | ||||
-rw-r--r-- | README.md | 6 |
4 files changed, 62 insertions, 49 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..199b9944 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,59 @@ +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: Checkout symbols + if: ${{ github.event_name == 'push' && github.repository_owner == 'pret' }} + uses: actions/checkout@master + with: + path: symbols + ref: symbols + + - name: Move symbols + if: ${{ github.event_name == 'push' && github.repository_owner == 'pret' }} + run: | + cp -v *.sym symbols/ + + - name: Update symbols + if: ${{ github.event_name == 'push' && github.repository_owner == 'pret' }} + uses: EndBug/add-and-commit@v7 + with: + branch: symbols + cwd: "./symbols" + add: "*.sym" + message: ${{ github.event.commits[0].message }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 15dd16b9..00000000 --- a/.travis.yml +++ /dev/null @@ -1,34 +0,0 @@ -language: c -os: - - linux - - osx -install: - - |- - ( cd - if [ "$TRAVIS_OS_NAME" = osx ]; then - HOMEBREW_NO_AUTO_UPDATE=1 brew install bison - export PATH="/usr/local/opt/bison/bin:$PATH" - fi - git clone -b v0.5.1 --depth=1 https://github.com/gbdev/rgbds - sudo make -C rgbds install - rm -rf rgbds - ) -before_script: - - |- - function check_status() { - if ! git diff-index --quiet --ignore-submodules=all HEAD --; then - echo 'Uncommitted changes detected:'; - git diff-index HEAD --; - return 1; - fi; - } -script: - - make DEBUG=1 -j2 compare - - check_status -after_success: - - |- - if [ "$TRAVIS_BRANCH" = master -a "$TRAVIS_PULL_REQUEST" = false -a "$TRAVIS_OS_NAME" = linux ]; then - if [ -n "$GITHUB_API_KEY" ]; then - ./.travis/upload_symbols.sh - fi - fi diff --git a/.travis/upload_symbols.sh b/.travis/upload_symbols.sh deleted file mode 100755 index 592c7787..00000000 --- a/.travis/upload_symbols.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -set -e - -commit_message=$(git log -1 --pretty=%B) - -git clone -b symbols https://github.com/pret/pokegold symbols -cd symbols - -cp ../*.sym . -git add *.sym -git -c user.name='travis' -c user.email='travis@travis-ci.org' commit -m "$commit_message" -git push -f -q https://pokepret:$GITHUB_API_KEY@github.com/pret/pokegold symbols &>/dev/null @@ -1,4 +1,4 @@ -# Pokémon Gold and Silver [![Build Status][travis-badge]][travis] +# Pokémon Gold and Silver [![Build Status][ci-badge]][ci] This is a disassembly of Pokémon Gold and Pokémon Silver. @@ -38,5 +38,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/pokegold -[travis-badge]: https://travis-ci.org/pret/pokegold.svg?branch=master +[ci]: https://github.com/pret/pokegold/actions +[ci-badge]: https://github.com/pret/pokegold/actions/workflows/main.yml/badge.svg |