Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add building of x64 libs to CI #200

Merged
merged 5 commits into from
Jan 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 68 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,35 @@ jobs:
target/i686-win7-windows-msvc/release/rust_g.dll
target/i686-win7-windows-msvc/release/rust_g.pdb
target/rust_g.dm

build-windows-x64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@nightly
with:
targets: x86_64-pc-windows-msvc
components: clippy, rustfmt, rust-src

- uses: Swatinem/rust-cache@v2

- name: x64 Clippy (all features)
run: cargo clippy -Z build-std --target x86_64-pc-windows-msvc --features all,allow_non_32bit --locked -- -D warnings

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

- name: x64 Build (release) (default features)
run: cargo build -Z build-std --target x86_64-pc-windows-msvc --features allow_non_32bit --locked --release

- uses: actions/upload-artifact@v4
with:
name: Windows Build x64
path: |
target/x86_64-pc-windows-msvc/release/rust_g.dll
target/x86_64-pc-windows-msvc/release/rust_g.pdb
target/rust_g.dm

build-linux:
runs-on: ubuntu-latest
Expand All @@ -54,7 +83,7 @@ jobs:

- uses: dtolnay/rust-toolchain@nightly
with:
targets: i686-unknown-linux-gnu
targets: i686-unknown-linux-gnu, x86_64-unknown-linux-gnu

- uses: Swatinem/rust-cache@v2

Expand All @@ -78,3 +107,41 @@ jobs:
path: |
target/i686-unknown-linux-gnu/release/librust_g.so
target/rust_g.dm

build-linux-x64:
runs-on: ubuntu-latest
env:
BYOND_MAJOR: 515
BYOND_MINOR: 1642
PKG_CONFIG_ALLOW_CROSS: 1

steps:
- uses: actions/checkout@v4

- run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libgcc-s1:i386 g++-multilib zlib1g-dev:i386
./scripts/install_byond.sh

- uses: dtolnay/rust-toolchain@nightly
with:
targets: x86_64-unknown-linux-gnu

- uses: Swatinem/rust-cache@v2

- name: x64 Check (all features)
run: cargo check --target x86_64-unknown-linux-gnu --locked --features all,allow_non_32bit

- name: x64 Build (Debug) (all features)
run: cargo build --target x86_64-unknown-linux-gnu --locked --features all,allow_non_32bit

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

- uses: actions/upload-artifact@v4
with:
name: Linux Build x64
path: |
target/x86_64-unknown-linux-gnu/release/librust_g.so
target/rust_g.dm
Loading