|
| 1 | +name: CI-compile-ps2dev-latest |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
| 6 | + workflow_dispatch: |
| 7 | + repository_dispatch: |
| 8 | + types: [run_build] |
| 9 | + |
| 10 | +jobs: |
| 11 | + build: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + container: ps2dev/ps2dev:latest |
| 14 | + steps: |
| 15 | + - name: git checkout |
| 16 | + uses: actions/checkout@v5 |
| 17 | + |
| 18 | + - run: | |
| 19 | + git config --global --add safe.directory "$GITHUB_WORKSPACE" |
| 20 | + git fetch --prune --unshallow |
| 21 | +
|
| 22 | + - name: Compile -> make clean release |
| 23 | + run: make --trace clean release |
| 24 | + |
| 25 | + - name: Create detailed changelog |
| 26 | + run: sh ./make_changelog.sh |
| 27 | + |
| 28 | + - name: Upload release artifact ELF |
| 29 | + if: ${{ success() }} |
| 30 | + uses: actions/upload-artifact@v6 |
| 31 | + with: |
| 32 | + name: OPNPS2LD-ps2dev-latest |
| 33 | + path: | |
| 34 | + OPNPS2LD-*.ELF |
| 35 | +
|
| 36 | + - name: Upload release artifact info |
| 37 | + if: ${{ success() }} |
| 38 | + uses: actions/upload-artifact@v6 |
| 39 | + with: |
| 40 | + name: INFO-ps2dev-latest |
| 41 | + path: | |
| 42 | + DETAILED_CHANGELOG |
| 43 | + CREDITS |
| 44 | + LICENSE |
| 45 | + README.md |
| 46 | +
|
| 47 | + build-variants: |
| 48 | + strategy: |
| 49 | + fail-fast: false |
| 50 | + matrix: |
| 51 | + extra: [EXTRA_FEATURES=0, EXTRA_FEATURES=1] |
| 52 | + pademu: [PADEMU=0, PADEMU=1] |
| 53 | + runs-on: ubuntu-latest |
| 54 | + container: ps2dev/ps2dev:latest |
| 55 | + steps: |
| 56 | + - name: git checkout |
| 57 | + uses: actions/checkout@v5 |
| 58 | + |
| 59 | + - run: | |
| 60 | + git config --global --add safe.directory "$GITHUB_WORKSPACE" |
| 61 | + git fetch --prune --unshallow |
| 62 | +
|
| 63 | + - name: Get version |
| 64 | + run: | |
| 65 | + echo "OPL_VERSION=$(make oplversion)" >> $GITHUB_ENV |
| 66 | +
|
| 67 | + - name: Compile -> make ${{ matrix.extra }} ${{ matrix.pademu }} ${{ matrix.extra }} NOT_PACKED=1 |
| 68 | + run: | |
| 69 | + make --trace ${{ matrix.pademu }} ${{ matrix.extra }} NOT_PACKED=1 |
| 70 | + mv opl.elf OPNPS2LD-${{ env.OPL_VERSION }}-${{ matrix.pademu }}-${{ matrix.extra }}.ELF |
| 71 | +
|
| 72 | + - name: Create detailed changelog |
| 73 | + run: sh ./make_changelog.sh |
| 74 | + |
| 75 | + - name: Upload variants artifact ELF |
| 76 | + uses: actions/upload-artifact@v6 |
| 77 | + with: |
| 78 | + name: OPNPS2LD-VARIANTS-ps2dev-latest ${{ matrix.pademu }} ${{ matrix.extra }} |
| 79 | + path: OPNPS2LD*.ELF |
| 80 | + |
| 81 | + merge-variants: |
| 82 | + runs-on: ubuntu-latest |
| 83 | + needs: build-variants |
| 84 | + steps: |
| 85 | + - name: Merge Artifacts |
| 86 | + uses: actions/upload-artifact/merge@v6 |
| 87 | + with: |
| 88 | + name: OPNPS2LD-VARIANTS-ps2dev-latest |
| 89 | + pattern: OPNPS2LD-VARIANTS-ps2dev-latest* |
| 90 | + delete-merged: true |
| 91 | + |
| 92 | + build-lang: |
| 93 | + runs-on: ubuntu-latest |
| 94 | + container: ps2dev/ps2dev:latest |
| 95 | + steps: |
| 96 | + - name: git checkout |
| 97 | + uses: actions/checkout@v5 |
| 98 | + |
| 99 | + - run: | |
| 100 | + git config --global --add safe.directory "$GITHUB_WORKSPACE" |
| 101 | + git fetch --prune --unshallow |
| 102 | +
|
| 103 | + - name: Compile -> make download_lng languages |
| 104 | + run: make --trace download_lng languages |
| 105 | + |
| 106 | + - name: Create artifact |
| 107 | + run: sh ./lng_pack.sh |
| 108 | + |
| 109 | + - name: Upload release artifact |
| 110 | + if: ${{ success() }} |
| 111 | + uses: actions/upload-artifact@v6 |
| 112 | + with: |
| 113 | + name: OPNPS2LD-LANGS-ps2dev-latest |
| 114 | + path: | |
| 115 | + OPNPS2LD-LANGS-*.zip |
| 116 | +
|
| 117 | + build-debug: |
| 118 | + strategy: |
| 119 | + fail-fast: false |
| 120 | + matrix: |
| 121 | + debug: [iopcore_debug, ingame_debug, eesio_debug, iopcore_ppctty_debug, ingame_ppctty_debug, DTL_T10000=1] |
| 122 | + runs-on: ubuntu-latest |
| 123 | + container: ps2dev/ps2dev:latest |
| 124 | + steps: |
| 125 | + - name: git checkout |
| 126 | + uses: actions/checkout@v5 |
| 127 | + |
| 128 | + - run: | |
| 129 | + git config --global --add safe.directory "$GITHUB_WORKSPACE" |
| 130 | + git fetch --prune --unshallow |
| 131 | +
|
| 132 | + - name: Get version |
| 133 | + run: | |
| 134 | + echo "OPL_VERSION=$(make oplversion)" >> $GITHUB_ENV |
| 135 | +
|
| 136 | + - name: Compile -> make debug |
| 137 | + run: | |
| 138 | + make ${{ matrix.debug }} --trace |
| 139 | + mv opl.elf opl-${{ matrix.debug }}-${{ env.OPL_VERSION }}-ps2dev-latest.elf |
| 140 | +
|
| 141 | + - name: Upload variants artifact ELF |
| 142 | + uses: actions/upload-artifact@v6 |
| 143 | + with: |
| 144 | + name: opl-${{ matrix.debug }}-${{ env.OPL_VERSION }}-ps2dev-latest |
| 145 | + path: opl-*.elf |
| 146 | + |
| 147 | + merge-debug: |
| 148 | + runs-on: ubuntu-latest |
| 149 | + needs: build-debug |
| 150 | + steps: |
| 151 | + - name: Merge Artifacts |
| 152 | + uses: actions/upload-artifact/merge@v6 |
| 153 | + with: |
| 154 | + name: OPNPS2LD-DEBUG-ps2dev-latest |
| 155 | + pattern: opl-* |
| 156 | + delete-merged: true |
0 commit comments