cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

gbdk_build_examples.yml (6125B)


      1name: GBDK Build Examples
      2
      3on:
      4  # Allows you to run this workflow manually from the Actions tab
      5  workflow_dispatch:
      6  # Triggers the workflow on push or pull request events but only for the develop branch
      7  # push:
      8  #   branches: [ develop ]
      9  # pull_request:
     10  #   branches: [ develop ]
     11
     12jobs:
     13  build:
     14    runs-on: ${{ matrix.os }}  
     15    strategy:
     16      matrix:       
     17        include:
     18          - os: ubuntu-20.04
     19            name: Linux-x64
     20          - os: macos-10.15
     21            name: MacOS-x64
     22          - os: windows-2019
     23            name: Windows-x64
     24          - os: windows-2019
     25            name: Windows-x32
     26    steps:
     27
     28      # ==== OS Specific Dependencies ====
     29      - name: Linux Depends
     30        if: matrix.name == 'Linux-x64'
     31        run: |
     32          # Use patched sms/gg z80 build:
     33          # For GBDK-2020 4.0.5
     34          # curl -Lo sdcc.tar.bz2 https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched/sdcc-amd64-linux2.5-20210711-12539--sms-gg-patched.tar.bz2
     35          # For GBDK-2020 4.0.6
     36          # curl -Lo sdcc.tar.bz2 https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched-gbdk0-4.0.6/sdcc-amd64-linux2.5-20211031-12539--sms-gg-patched.tar.bz2
     37          # For GBDK-2020 4.1.0
     38          curl -Lo sdcc.tar.bz2 https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-13350-patched-gbdk-4.1.0/sdcc-amd64-linux2.5-20220402-13350--sdldz80-patched-at-12539.tar.bz2
     39          bunzip2 sdcc.tar.bz2
     40          tar xvf sdcc.tar
     41
     42      - name: MacOS Depends
     43        if: matrix.name == 'MacOS-x64'
     44        run: |
     45          # Use patched sms/gg z80 build:
     46          # For GBDK-2020 4.0.5
     47          # curl -Lo sdcc.tar.bz2 https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched/sdcc-x86_64-apple-macosx-20210718-12548--sms-gg-patched.tar.bz2
     48          # For GBDK-2020 4.0.6
     49          # curl -Lo sdcc.tar.bz2 https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched-gbdk0-4.0.6/sdcc-x86_64-apple-macosx-20210718-12548--sms-gg-patched.tar.bz2
     50          # For GBDK-2020 4.1.0
     51          curl -Lo sdcc.tar.bz2 https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-13350-patched-gbdk-4.1.0/sdcc-x86_64-apple-macosx-20220402-13350--sdldz80-patched-at-12539.tar.bz2
     52          bunzip2 sdcc.tar.bz2
     53          tar xvf sdcc.tar
     54
     55      - name: Windows-x64 Depends
     56        if: matrix.name == 'Windows-x64'
     57        run: |
     58          # Use patched sms/gg z80 build:
     59          # For GBDK-2020 4.0.5
     60          # curl -Lo sdcc.zip https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched/sdcc-x86_64-w64-mingw32-20210711-12539--sms-gg-patched.zip
     61          # For GBDK-2020 4.0.6: adds makebin -yN
     62          # curl -Lo sdcc.zip https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched-gbdk0-4.0.6/sdcc-x86_64-w64-mingw32-20210711-12539--sms-gg-patched_makebin_yN.zip
     63          # For GBDK-2020 4.1.0
     64          curl -Lo sdcc.zip https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-13350-patched-gbdk-4.1.0/sdcc-x86_64-w64-mingw32-20220402-13350--sdldz80-patched-at-12539.zip
     65          7z x sdcc.zip
     66
     67      - name: Windows-x32 Depends
     68        if: matrix.name == 'Windows-x32'
     69        run: |
     70          # Use patched sms/gg z80 build:
     71          # For GBDK-2020 4.0.6: adds makebin -yN
     72          # curl -Lo sdcc.zip https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-12539-patched-gbdk0-4.0.6/sdcc-i586-mingw32msvc-20210711-12539--sms-gg-patched_makebin_yN.zip
     73          # For GBDK-2020 4.1.0
     74          curl -Lo sdcc.zip https://github.com/gbdk-2020/gbdk-2020-sdcc/releases/download/sdcc-13350-patched-gbdk-4.1.0/sdcc-i586-mingw32msvc-20220402-13350--sdldz80-patched-at-12539.zip
     75          7z x sdcc.zip
     76
     77      - name: Windows Depends MSYS2/MinGW64
     78        if: matrix.name == 'Windows-x64'
     79        uses: msys2/setup-msys2@v2
     80        with:
     81          msystem: MINGW64
     82          path-type: minimal #strict
     83          release: false
     84          update: false
     85          install: >-
     86            base-devel
     87            mingw-w64-x86_64-toolchain
     88
     89      - name: Windows Depends MSYS2/MinGW32
     90        if: matrix.name == 'Windows-x32'
     91        uses: msys2/setup-msys2@v2
     92        with:
     93          msystem: MINGW32
     94          path-type: minimal #strict
     95          release: false
     96          update: false
     97          install: >-
     98            base-devel
     99            mingw-w64-i686-toolchain
    100
    101      # ==== Build Steps ====
    102      - name: Check out GBDK-2020
    103        uses: actions/checkout@v2
    104        with:
    105          path: gbdk-2020
    106          submodules: false
    107
    108      # ==== Pre-Build: Set environment vars ====
    109      # Needs to be in a separate step than build so that setting the environment var takes effect
    110      #
    111      - name: Pre-Build Linux/MacOS
    112        if: (matrix.name == 'Linux-x64') || (matrix.name == 'MacOS-x64')
    113        shell: bash
    114        run: |
    115          echo "BUILD_PACKAGE_FILENAME=gbdk-2020-${{ matrix.name }}.tar.gz" >> $GITHUB_ENV
    116
    117      - name: Pre-Build Windows
    118        if: (matrix.name == 'Windows-x64') || (matrix.name == 'Windows-x32')
    119        shell: bash
    120        run: |
    121          echo "BUILD_PACKAGE_FILENAME=gbdk-2020-${{ matrix.name }}.zip" >> $GITHUB_ENV
    122
    123      # ==== Builds ====
    124      - name: Build GBDK-2020 Linux/MacOS
    125        if: (matrix.name == 'Linux-x64') || (matrix.name == 'MacOS-x64')
    126        shell: bash
    127        run: |
    128          export SDCCDIR=`pwd`/sdcc
    129          cd gbdk-2020
    130          make
    131          # Now build the examples for all platforms
    132          cd build
    133          cd gbdk
    134          cd examples
    135          make
    136          cd ..
    137          cd ..
    138          cd ..
    139          cd ..
    140
    141      - name: Build GBDK-2020 Windows
    142        if: (matrix.name == 'Windows-x64') || (matrix.name == 'Windows-x32')
    143        shell: cmd
    144        run: |
    145          set SDCCDIR=%CD%\sdcc
    146          cd gbdk-2020
    147          msys2 -c 'make'
    148          # Now build the examples for all platforms
    149          cd build
    150          cd gbdk
    151          cd examples
    152          msys2 -c 'make'
    153          cd ..
    154          cd ..
    155          cd ..
    156          cd ..
    157