Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: build

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
if: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push' }}
runs-on: ubuntu-20.04
steps:
- name: Checkout this repo
uses: actions/checkout@v2

- name: Checkout tools
uses: actions/checkout@v2
with:
repository: mattbruv/bfbb-private
token: ${{ secrets.PRIVATE_REPO_ACCESS }}
path: bfbb-tools
- name: Decrypt tools
run: echo ${{ secrets.BFBB_TOOLS }} | openssl enc -d -aes-256-cbc -pass stdin -pbkdf2 -in bfbb-tools/bfbb.tar.gz.aes -out bfbb.tar.gz
- name: Extract tools
run: tar xvzf bfbb.tar.gz
- name: Compile
uses: docker://docker.io/markstreet/bfbbdecomp:latest
with:
args: make --jobs
- name: Clang Format
uses: docker://docker.io/markstreet/bfbbdecomp:latest
with:
args: sh -c "clang-format -i -style=file src/**/*.cpp || echo \"::warning clang-formatter check failed\""
34 changes: 34 additions & 0 deletions .github/workflows/build_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: build_pr

on:
pull_request_target:
branches: [ master ]

jobs:
build_pr:
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
runs-on: ubuntu-20.04
steps:
- name: Checkout this repo
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Checkout tools
uses: actions/checkout@v2
with:
repository: mattbruv/bfbb-private
token: ${{ secrets.PRIVATE_REPO_ACCESS }}
path: bfbb-tools
- name: Decrypt tools
run: echo ${{ secrets.BFBB_TOOLS }} | openssl enc -d -aes-256-cbc -pass stdin -pbkdf2 -in bfbb-tools/bfbb.tar.gz.aes -out bfbb.tar.gz
- name: Extract tools
run: tar xvzf bfbb.tar.gz
- name: Compile
uses: docker://docker.io/markstreet/bfbbdecomp:latest
with:
args: make --jobs
- name: Clang Format
uses: docker://docker.io/markstreet/bfbbdecomp:latest
with:
args: sh -c "clang-format -i -style=file src/**/*.cpp || echo \"::warning clang-formatter check failed\""
35 changes: 35 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM ubuntu:20.04

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && \
apt-get install -y \
build-essential \
clang-format \
python3 \
wget \
wine

RUN dpkg --add-architecture i386 && \
apt-get update && apt-get install -y wine32

RUN wget https://github.com/devkitPro/pacman/releases/download/v1.0.2/devkitpro-pacman.amd64.deb \
-O devkitpro.deb && \
echo ebc9f199da9a685e5264c87578efe29309d5d90f44f99f3dad9dcd96323fece3 devkitpro.deb | sha256sum --check && \
apt install -y ./devkitpro.deb && \
rm devkitpro.deb

RUN dkp-pacman -Syu gamecube-dev --noconfirm

RUN mkdir /bfbbdecomp
WORKDIR /bfbbdecomp

ENV DEVKITPRO=/opt/devkitpro
ENV DEVKITPPC=/opt/devkitpro/devkitPPC

ENV MWCIncludes="C:\\"
ENV MWLibraries="C:\\"
ENV MWLibraryFiles="C:\\"
ENV Path=/bfbbdecomp/tools/mwcc_compiler/2.0/
# this is a hack for github actions, use '-e WINEPREFIX /root/.wine' locally
ENV WINEPREFIX=/bfbbdecomp/.wine