CDB: Opti on search #6161
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 4 * * *' | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| haxe-version: [latest, 4.3.7] | |
| fail-fast: false | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - uses: krdlab/setup-haxe@v1 | |
| with: | |
| haxe-version: ${{ matrix.haxe-version }} | |
| - name: Print Haxe version | |
| run: | | |
| haxe --version | |
| - name: Build | |
| run: | | |
| haxelib git format https://github.com/HaxeFoundation/format | |
| haxelib git heaps https://github.com/HeapsIO/heaps | |
| haxelib git castle https://github.com/ncannasse/castle | |
| haxelib git hxbit https://github.com/ncannasse/hxbit | |
| haxelib git hscript https://github.com/HaxeFoundation/hscript | |
| haxelib git hxnodejs https://github.com/HaxeFoundation/hxnodejs | |
| haxelib git domkit https://github.com/HeapsIO/domkit | |
| haxelib git hx3compat https://github.com/HaxeFoundation/hx3compat | |
| haxelib git hashlink https://github.com/HaxeFoundation/hashlink master other/haxelib/ | |
| haxe hide.hxml | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: js-${{ matrix.haxe-version }} | |
| path: | | |
| bin/*.js | |
| bin/*.js.map | |
| - name: Test - Build sample | |
| run: | | |
| haxelib dev hide . | |
| haxelib git hlsdl https://github.com/HaxeFoundation/hashlink master libs/sdl | |
| cd sample | |
| haxe hide-plugin.hxml | |
| haxe main.hxml | |
| cd .. | |
| deploy: | |
| if: github.repository_owner == 'HeapsIO' && github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.event_name != 'push' | |
| needs: build | |
| runs-on: ubuntu-latest | |
| env: | |
| nwjs-version: v0.101.2 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Download js | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: js-4.3.7 | |
| path: bin | |
| - name: Install deploy packages | |
| run: sudo apt-get install p7zip-full | |
| - name: Windows | |
| run: | | |
| wget -O nwjs-win.zip https://dl.nwjs.io/${{env.nwjs-version}}/nwjs-sdk-${{env.nwjs-version}}-win-x64.zip | |
| unzip nwjs-win.zip | |
| mkdir -p zips | |
| cp -r bin zips/windows | |
| cp -r nwjs-sdk-${{env.nwjs-version}}-win-x64 zips/windows/nwjs | |
| cd zips/windows | |
| 7z a -mm=Deflate -mx=9 ../windows.zip * | |
| cd ../.. | |
| rm -rf zips/windows | |
| - name: Linux | |
| run: | | |
| wget -O nwjs-linux.tar.gz https://dl.nwjs.io/${{env.nwjs-version}}/nwjs-sdk-${{env.nwjs-version}}-linux-x64.tar.gz | |
| tar -xvzf nwjs-linux.tar.gz | |
| mkdir -p zips | |
| cp -r bin zips/linux | |
| cp -r nwjs-sdk-${{env.nwjs-version}}-linux-x64 zips/linux/nwjs | |
| cd zips/linux | |
| 7z a -mm=Deflate -mx=9 ../linux.zip * | |
| cd ../.. | |
| rm -rf zips/linux | |
| - name: Mac | |
| run: | | |
| wget -O nwjs-mac.zip https://dl.nwjs.io/${{env.nwjs-version}}/nwjs-sdk-${{env.nwjs-version}}-osx-x64.zip | |
| unzip nwjs-mac.zip | |
| mkdir -p zips/mac | |
| cp -r nwjs-sdk-${{env.nwjs-version}}-osx-x64/nwjs.app zips/mac/nwjs.app | |
| cp -r bin zips/mac/nwjs.app/Contents/Resources/app.nw | |
| cd zips/mac | |
| 7z a -mm=Deflate -mx=9 ../mac.zip * | |
| cd ../.. | |
| rm -rf zips/mac | |
| - name: Deploy | |
| run: | | |
| mkdir ~/.ssh | |
| echo "${{secrets.DEPLOY_KEY}}" > ~/.ssh/id_rsa | |
| chmod 600 ~/.ssh/id_rsa | |
| scp -o StrictHostKeyChecking=no zips/* gama11@community.heaps.io:builds/hide |