fix(java): fixed broken config and textchange conversions #46
This file contains 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: lua | |
on: | |
push: | |
branches: | |
- stable | |
- dev | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ${{ matrix.platform.runner }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- runner: ubuntu-latest | |
arch: x86_64 | |
target: linux-gnu | |
pre: lib | |
ext: so | |
buildcmd: cargo build --release --features=luajit | |
- runner: windows-latest | |
arch: x86_64 | |
target: windows-msvc | |
pre: | |
ext: dll | |
buildcmd: cargo build --release --features=luajit | |
- runner: macos-latest | |
arch: aarch64 | |
target: darwin | |
pre: lib | |
ext: dylib | |
buildcmd: cargo rustc --release --features=luajit -- -C link-arg=-undefined -C link-arg=dynamic_lookup | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: arduino/setup-protoc@v3 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- run: ${{ matrix.platform.buildcmd }} | |
- 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 | |
with: | |
name: codemp-lua-${{ matrix.platform.target }} | |
path: dist/lua/codemp-lua-${{matrix.platform.arch}}-${{matrix.platform.target}}.${{matrix.platform.ext}} | |
# TODO this just copies files on our server, maybe consider other ways to distribute? maybe do it properly with versions? | |
publish: | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v4 | |
- run: mkdir dist/lua/publish | |
- uses: webfactory/ssh-agent@v0.9.0 | |
with: | |
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: codemp-lua-* | |
path: dist/lua/publish | |
- run: tree dist/lua | |
- run: scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null dist/lua/annotations.lua dev@codemp.dev:/srv/http/codemp/files/releases/lua/ | |
# TODO ugly fix to deal with folders on this side... | |
- name: copy files on remote | |
run: | | |
for DIR in $(ls dist/lua/publish); do | |
scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null dist/lua/publish/$DIR/* dev@codemp.dev:/srv/http/codemp/files/releases/lua/ | |
done |