|
| 1 | +name: JE |
| 2 | + |
| 3 | +on: |
| 4 | + - push |
| 5 | + |
| 6 | +# trigger workflow on file change |
| 7 | +#on: |
| 8 | +# push: |
| 9 | +# paths: |
| 10 | +# - 'version.txt' |
| 11 | + |
| 12 | +jobs: |
| 13 | + jengine: |
| 14 | + name: JE |
| 15 | + runs-on: ${{ matrix.os }} |
| 16 | + |
| 17 | + strategy: |
| 18 | + matrix: |
| 19 | + os: [ubuntu-18.04, macos-10.15, windows-2019] |
| 20 | + #os: [ubuntu-18.04] |
| 21 | + #os: [macos-10.15] |
| 22 | + #os: [windows-2019] |
| 23 | + |
| 24 | + steps: |
| 25 | + - name: Check Git repository |
| 26 | + uses: actions/checkout@v2 |
| 27 | + with: |
| 28 | + submodules: recursive |
| 29 | + |
| 30 | + - name: Setup Environment (Linux) |
| 31 | + if: matrix.os == 'ubuntu-18.04' |
| 32 | + run: | |
| 33 | + sudo apt-get install -y libedit-dev libncursesw5-dev |
| 34 | +
|
| 35 | + - name: Setup Environment (Windows) |
| 36 | + if: matrix.os == 'windows-2019' |
| 37 | + uses: ilammy/msvc-dev-cmd@v1 |
| 38 | + with: |
| 39 | + arch: amd64 |
| 40 | + |
| 41 | + - name: Build JE (Linux) |
| 42 | + if: matrix.os == 'ubuntu-18.04' |
| 43 | + env: |
| 44 | + CC: clang |
| 45 | + USE_SLEEF: 1 |
| 46 | + run: script/buildga.sh linux |
| 47 | + |
| 48 | + - name: Build JE (macOS) |
| 49 | + if: matrix.os == 'macos-10.15' |
| 50 | + env: |
| 51 | + CC: clang |
| 52 | + USE_SLEEF: 1 |
| 53 | + run: script/buildga.sh darwin |
| 54 | + |
| 55 | + - name: Build JE (Windows) |
| 56 | + if: matrix.os == 'windows-2019' |
| 57 | + shell: cmd |
| 58 | + run: script\buildga.cmd |
| 59 | + |
| 60 | + - name: Test JE (Linux) |
| 61 | + if: matrix.os == 'ubuntu-18.04' |
| 62 | + run: script/testga.sh linux |
| 63 | + |
| 64 | + - name: Test JE (maxOS) |
| 65 | + if: matrix.os == 'macos-10.15' |
| 66 | + run: script/testga.sh darwin |
| 67 | + |
| 68 | + - name: Test JE (Windows) |
| 69 | + if: matrix.os == 'windows-2019' |
| 70 | + shell: cmd |
| 71 | + run: script\testga.cmd |
| 72 | + |
| 73 | + - name: Compress Files (Linux) |
| 74 | + if: matrix.os == 'ubuntu-18.04' |
| 75 | + run: | |
| 76 | + rm j64/ver.ijs |
| 77 | + zip -r l64.zip j64 |
| 78 | +
|
| 79 | + - name: Compress Files (macOS) |
| 80 | + if: matrix.os == 'macos-10.15' |
| 81 | + run: | |
| 82 | + rm j64/ver.ijs |
| 83 | + zip -r m64.zip j64 |
| 84 | +
|
| 85 | + - name: Compress Files (Windows) |
| 86 | + if: matrix.os == 'windows-2019' |
| 87 | + shell: pwsh |
| 88 | + run: | |
| 89 | + del j64\ver.ijs |
| 90 | + Compress-Archive j64 w64.zip |
| 91 | +
|
| 92 | + - name: Release JE (Linux) |
| 93 | + if: matrix.os == 'ubuntu-18.04' |
| 94 | + uses: ncipollo/release-action@v1 |
| 95 | + with: |
| 96 | + tag: build |
| 97 | + artifacts: "l64.zip" |
| 98 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 99 | + allowUpdates: true |
| 100 | + replacesArtifacts: true |
| 101 | + |
| 102 | + - name: Release JE (macOS) |
| 103 | + if: matrix.os == 'macos-10.15' |
| 104 | + uses: ncipollo/release-action@v1 |
| 105 | + with: |
| 106 | + tag: build |
| 107 | + artifacts: "m64.zip" |
| 108 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 109 | + allowUpdates: true |
| 110 | + replacesArtifacts: true |
| 111 | + |
| 112 | + - name: Release JE (Windows) |
| 113 | + if: matrix.os == 'windows-2019' |
| 114 | + uses: ncipollo/release-action@v1 |
| 115 | + with: |
| 116 | + tag: build |
| 117 | + artifacts: "w64.zip" |
| 118 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 119 | + allowUpdates: true |
| 120 | + replacesArtifacts: true |
| 121 | + |
| 122 | + webhook: |
| 123 | + name: Run Webhook |
| 124 | + runs-on: ubuntu-18.04 |
| 125 | + needs: jengine |
| 126 | + steps: |
| 127 | + - name: update server |
| 128 | + uses: distributhor/workflow-webhook@v2 |
| 129 | + env: |
| 130 | + webhook_url: ${{ secrets.WEBHOOK_URL }} |
| 131 | + webhook_secret: ${{ secrets.WEBHOOK_SECRET }} |
| 132 | + data: '{ "id": "jebuild" }' |
0 commit comments