ci(lua): ops re-inverted matrix stuff

This commit is contained in:
əlemi 2024-09-10 16:09:56 +02:00
parent 0703bed3f1
commit 3c6441678d
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -15,15 +15,15 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
target: platform:
- runner: ubuntu-latest - runner: ubuntu-latest
arch: x86_64 arch: x86_64
platform: linux-gnu target: linux-gnu
pre: lib pre: lib
ext: so ext: so
- runner: windows-latest - runner: windows-latest
arch: x86_64 arch: x86_64
platform: linux-gnu target: linux-gnu
pre: pre:
ext: dll ext: dll
steps: steps:
@ -33,11 +33,11 @@ jobs:
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: cargo build --release --features=luajit - run: cargo build --release --features=luajit
- run: mv target/release/${{matrix.target.pre}}codemp.${{matrix.target.ext}} dist/lua/codemp-lua-${{matrix.target.arch}}-${{matrix.target.platform}}.${{matrix.target.ext}} - run: mv target/release/${{matrix.platform.pre}}codemp.${{matrix.platform.ext}} dist/lua/codemp-lua-${{matrix.platform.arch}}-${{matrix.platform.target}}.${{matrix.platform.ext}}
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: codemp-lua-${{ matrix.platform.target }} name: codemp-lua-${{ matrix.platform.target }}
path: dist/lua/codemp-lua-${{matrix.target.arch}}-${{matrix.target.platform}}.${{matrix.target.ext}} path: dist/lua/codemp-lua-${{matrix.platform.arch}}-${{matrix.platform.target}}.${{matrix.platform.ext}}
# macos requires some extra cargo config to make it work, but # macos requires some extra cargo config to make it work, but
# these settings make test fail so better limit them to this run # these settings make test fail so better limit them to this run
@ -49,7 +49,7 @@ jobs:
platform: platform:
- runner: macos-latest - runner: macos-latest
arch: aarch64 arch: aarch64
platform: darwin target: darwin
pre: lib pre: lib
ext: dylib ext: dylib
#- runner: macos-12 #- runner: macos-12
@ -64,11 +64,11 @@ jobs:
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: cargo rustc --release --features=luajit -- -C link-arg=-undefined -C link-arg=dynamic_lookup - run: cargo rustc --release --features=luajit -- -C link-arg=-undefined -C link-arg=dynamic_lookup
- run: mv target/release/${{matrix.target.pre}}codemp.${{matrix.target.ext}} dist/lua/codemp-lua-${{matrix.target.arch}}-${{matrix.target.platform}}.${{matrix.target.ext}} - run: mv target/release/${{matrix.platform.pre}}codemp.${{matrix.platform.ext}} dist/lua/codemp-lua-${{matrix.platform.arch}}-${{matrix.platform.target}}.${{matrix.platform.ext}}
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: codemp-lua-${{ matrix.platform.target }} name: codemp-lua-${{ matrix.platform.target }}
path: dist/lua/codemp-lua-${{matrix.target.arch}}-${{matrix.target.platform}}.${{matrix.target.ext}} path: dist/lua/codemp-lua-${{matrix.platform.arch}}-${{matrix.platform.target}}.${{matrix.platform.ext}}
# TODO this just copies files on our server, maybe publish on luarocks? maybe do it properly with versions # TODO this just copies files on our server, maybe publish on luarocks? maybe do it properly with versions
publish: publish: