Skip to content

Commit

Permalink
build using newer bindgen
Browse files Browse the repository at this point in the history
  • Loading branch information
Y0SH1M4S73R committed Jul 7, 2024
1 parent dd7f6ad commit 0c18746
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 46 deletions.
63 changes: 44 additions & 19 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,43 @@ jobs:
files: |
**/*.rs
Cargo.lock
build:
build-windows:
runs-on: windows-latest
needs: check-needs-rebuild
if: ${{ needs.check-needs-rebuild.outputs.needs-rebuild == 'true' || inputs.force_rebuild }}
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable
with:
targets: i686-pc-windows-msvc
components: rustfmt, clippy

- name: Clippy (all features)
run: cargo clippy --target i686-pc-windows-msvc --locked -- -D warnings

- name: Upload bindings.rs build artifact
id: upload_bindings
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: bindings.rs
path: target/i686-pc-windows-msvc/debug/build/byondapi-sys**/out/bindings.rs

- if: ${{ steps.upload_bindings.outcome == 'success' }}
run: exit 1

- name: Rustfmt
run: cargo fmt -- --check

- name: Build (release) (default features)
run: cargo build --target i686-pc-windows-msvc --locked --release

- uses: actions/upload-artifact@v4
with:
name: dreamluau_windows
path: target/i686-pc-windows-msvc/release/dreamluau.dll
build-linux:
runs-on: ubuntu-20.04
needs: check-needs-rebuild
if: ${{ needs.check-needs-rebuild.outputs.needs-rebuild == 'true' || inputs.force_rebuild }}
Expand All @@ -41,45 +77,34 @@ jobs:
- run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install g++-multilib g++-mingw-w64-i686 zlib1g-dev:i386 libssl-dev:i386
sudo apt-get install g++-multilib zlib1g-dev:i386 libssl-dev:i386
./scripts/install_byond.sh
- uses: dtolnay/rust-toolchain@stable
with:
targets: i686-unknown-linux-gnu, i686-pc-windows-gnu
targets: i686-unknown-linux-gnu

- name: Check
- name: Check (all features)
run: cargo check --target i686-unknown-linux-gnu --locked

- name: Clippy
run: cargo clippy --target i686-unknown-linux-gnu --locked -- -D warnings

- name: Build (Debug)
- name: Build (Debug) (all features)
run: cargo build --target i686-unknown-linux-gnu --locked

- name: Run tests
- name: Run tests (all features)
run: cargo test --target i686-unknown-linux-gnu --locked
env:
BYOND_BIN: /home/runner/BYOND/byond/bin

- name: Build (release) (linux)
- name: Build (release) (default features)
run: cargo build --target i686-unknown-linux-gnu --locked --release

- name: Build (release) (windows)
run: cargo build --target i686-pc-windows-gnu --locked --release

- uses: actions/upload-artifact@v4
with:
name: dreamluau_linux
path: target/i686-unknown-linux-gnu/release/libdreamluau.so

- uses: actions/upload-artifact@v4
with:
name: dreamluau_windows
path: target/i686-pc-windows-gnu/release/dreamluau.dll
release:
runs-on: ubuntu-20.04
needs: "build"
needs: ["build-windows", "build-linux"]
if: contains(github.event.head_commit.message, '[release]')
steps:
- uses: actions/checkout@v4
Expand Down
21 changes: 12 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 0 additions & 18 deletions definechecker.h

This file was deleted.

0 comments on commit 0c18746

Please sign in to comment.