diff --git a/.github/actions/install_deps.sh b/.github/actions/install_deps.sh new file mode 100644 index 00000000..1c9749ef --- /dev/null +++ b/.github/actions/install_deps.sh @@ -0,0 +1,23 @@ +case `echo $1 | cut -d '-' -f 1` in + ubuntu) + sudo apt-get -qq update + sudo apt-get install -yq bison libpng-dev pkg-config libsdl2-dev + ( + cd `mktemp -d` + curl -L https://github.com/rednex/rgbds/archive/v0.4.0.zip > rgbds.zip + unzip rgbds.zip + cd rgbds-* + make -sj + sudo make install + cd .. + rm -rf * + ) + ;; + macos) + brew install rgbds sdl2 + ;; + *) + echo "Unsupported OS" + exit 1 + ;; +esac \ No newline at end of file diff --git a/.github/workflows/buildability.yml b/.github/workflows/buildability.yml new file mode 100644 index 00000000..e5f4a30e --- /dev/null +++ b/.github/workflows/buildability.yml @@ -0,0 +1,28 @@ +name: "Bulidability" +on: push + +jobs: + buildability: + strategy: + matrix: + os: [ubuntu-latest, ubuntu-16.04, macos-latest] + cc: [gcc, clang] + include: + - os: macos-latest + cc: clang + extra_target: cocoa + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Install deps + shell: bash + run: | + ./.github/actions/install_deps.sh ${{ matrix.os }} + - name: Build + run: | + make sdl ${{ matrix.extra_target }} -j CONF=release CC=${{ matrix.cc }} + - name: Upload binaries + uses: actions/upload-artifact@v1 + with: + name: sameboy-canary-${{ matrix.os }}-${{ matrix.cc }} + path: build/bin \ No newline at end of file