From 6d777fb18f0370c54c6b655bcce75a9852dc7f07 Mon Sep 17 00:00:00 2001 From: fgsfds Date: Sun, 13 Aug 2023 11:24:24 +0200 Subject: [PATCH] ci: start setting up CI --- .github/workflows/c-cpp.yml | 61 +++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/c-cpp.yml diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml new file mode 100644 index 000000000..30bbc7bdf --- /dev/null +++ b/.github/workflows/c-cpp.yml @@ -0,0 +1,61 @@ +name: C/C++ CI + +on: + push: + branches: [ "port" ] + pull_request: + branches: [ "port" ] + workflow_dispatch: + +jobs: + build-i686-windows: + runs-on: windows-latest + defaults: + run: + shell: msys2 {0} + steps: + - name: Install MSYS2 + uses: msys2/setup-msys2@v2 + with: + msystem: MINGW32 + update: true + install: >- + git + mingw-w64-i686-toolchain + mingw-w64-i686-SDL2 + mingw-w64-i686-zlib + - name: Checkout repository + uses: actions/checkout@v3 + - name: Build pd.exe + run: make -f Makefile.port -j + - name: Prepare artifact for packaging + run: | + mkdir -p bin/data + cp build/ntsc-final-port/pd.exe bin/ + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: pd-i686-windows + path: bin/ + retention-days: 0 + + build-i686-linux: + runs-on: ubuntu-latest + steps: + - name: Install dependencies + run: sudo apt-get install git gcc g++ make libsdl2-dev zlib1g-dev + - name: Checkout repository + uses: actions/checkout@v3 + - name: Build pd.exe + run: make -f Makefile.port TARGET_PLATFORM=i686-linux -j + - name: Prepare artifact for packaging + run: | + mkdir -p bin/data + cp build/ntsc-final-port/pd.exe bin/pd + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: pd-i686-linux + path: bin/ + retention-days: 0 +