|
| 1 | +name: windows-luajit |
| 2 | + |
| 3 | +on: [push] |
| 4 | + |
| 5 | +jobs: |
| 6 | + Build-Libs-LuaJIT-Windows: |
| 7 | + name: 'Build-Libs-LuaJIT-Windows' |
| 8 | + runs-on: windows-latest |
| 9 | + if: | |
| 10 | + contains(github.event.head_commit.message, '[all]') || |
| 11 | + contains(github.event.head_commit.message, '[windows]') || |
| 12 | + contains(github.event.head_commit.message, '[windows-luajit]') || |
| 13 | + contains(github.event.head_commit.message, '[luajit]') |
| 14 | +
|
| 15 | + steps: |
| 16 | + - name: 'Get LuaJIT' |
| 17 | + uses: actions/checkout@v4 |
| 18 | + with: |
| 19 | + repository: LuaJIT/LuaJIT |
| 20 | + ref: v2.1 |
| 21 | + path: LuaJIT |
| 22 | + |
| 23 | + - name: Install MinGW |
| 24 | + uses: msys2/setup-msys2@v2 |
| 25 | + with: |
| 26 | + msystem: mingw64 |
| 27 | + update: true |
| 28 | + install: >- |
| 29 | + mingw-w64-x86_64-toolchain |
| 30 | + base-devel |
| 31 | + git |
| 32 | + upx |
| 33 | +
|
| 34 | + - name: 'Build LuaJIT binary' |
| 35 | + working-directory: LuaJIT/src |
| 36 | + run: | |
| 37 | + make |
| 38 | +
|
| 39 | + - name: 'Archive artifacts' |
| 40 | + uses: actions/upload-artifact@v4 |
| 41 | + with: |
| 42 | + name: luajit-windows |
| 43 | + path: LuaJIT/src |
| 44 | + retention-days: 1 |
| 45 | + |
| 46 | + github-release: |
| 47 | + name: GitHub Release |
| 48 | + needs: Build-Libs-LuaJIT-Windows |
| 49 | + runs-on: ubuntu-latest |
| 50 | + if: startsWith(github.ref, 'refs/tags/') |
| 51 | + |
| 52 | + steps: |
| 53 | + - name: Setup | Checkout |
| 54 | + uses: actions/checkout@v4 |
| 55 | + |
| 56 | + - name: Setup | Artifacts |
| 57 | + uses: actions/download-artifact@v4 |
| 58 | + |
| 59 | + - name: Setup | Checksums |
| 60 | + run: for file in $(find ./ -name '*.dll' ); do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done |
| 61 | + |
| 62 | + - name: Zip ALL |
| 63 | + run: for file in *; do zip -r ${file%.*}.zip $file; done |
| 64 | + |
| 65 | + - name: Upload binaries to release |
| 66 | + uses: svenstaro/upload-release-action@v2 |
| 67 | + with: |
| 68 | + repo_token: ${{ secrets.GITHUB_TOKEN }} |
| 69 | + file: luajit-windows.zip |
| 70 | + tag: ${{ github.ref }} |
| 71 | + overwrite: true |
| 72 | + file_glob: true |
0 commit comments