Skip to content
Merged
Show file tree
Hide file tree
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
144 changes: 73 additions & 71 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:

jobs:
test-nightly:
name: Test (${{ contains(matrix.runs-on, 'arm') && 'AArch64' || 'x86_64'}}, ${{ matrix.container }}${{ matrix.test-qemu && ', QEMU' || ''}})
name: Test Linux (${{ contains(matrix.runs-on, 'arm') && 'AArch64' || 'x86_64'}}, ${{ matrix.container }}${{ matrix.test-qemu && ', QEMU' || ''}})

strategy:
matrix:
Expand Down Expand Up @@ -85,21 +85,73 @@ jobs:
- run: cargo test --profile ci --features plugins
if: ${{ matrix.test-plugins }}
- run: WILD_TEST_CROSS=$WILD_TEST_CROSS cargo test --profile ci --workspace
windows-build:
name: Windows build
runs-on: windows-latest

riscv-build:
name: Build Linux (RISC-V)
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
id: rust-toolchain
with:
targets: riscv64gc-unknown-linux-gnu
- uses: Swatinem/rust-cache@v2
- run: cargo build --profile ci --workspace --no-default-features
- run: sudo apt-get update && sudo apt-get install build-essential lld gcc-riscv64-linux-gnu g++-riscv64-linux-gnu
- run: cp -f .cargo/config.toml.cross-riscv .cargo/config.toml
- run: cargo build --target riscv64gc-unknown-linux-gnu

macos-build:
name: macOS build
loongarch64-build:
name: Build Linux (LoongArch64)
runs-on: ubuntu-24.04
timeout-minutes: 10
container:
image: ubuntu:25.10
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- run: apt-get update && apt-get install -y build-essential lld gcc gcc-loongarch64-linux-gnu g++-loongarch64-linux-gnu curl
- uses: dtolnay/rust-toolchain@stable
id: rust-toolchain
with:
targets: loongarch64-unknown-linux-gnu
- uses: Swatinem/rust-cache@v2
- run: cp -f .cargo/config.toml.cross-loongarch64 .cargo/config.toml
- run: cargo build --target loongarch64-unknown-linux-gnu

wasip1-build:
name: Build wasip1
runs-on: ubuntu-24.04
timeout-minutes: 10
container:
image: ubuntu:25.10
steps:
- name: Install xz-utils
run: apt-get update && apt-get install -y xz-utils
- name: Setup Wasmtime
uses: bytecodealliance/actions/wasmtime/setup@v1
with:
version: '43.0.0'
- uses: actions/checkout@v6
with:
persist-credentials: false
- run: apt-get install --update -y build-essential gcc gcc-multilib clang curl
- uses: dtolnay/rust-toolchain@stable
id: rust-toolchain
with:
targets: wasm32-wasip1
- uses: Swatinem/rust-cache@v2
- run: cargo build --target wasm32-wasip1
- run: cp -f .cargo/config.toml.cross-wasm32p1 .cargo/config.toml
# -p libwild prevents integration tests from running. they depend on
# spawning processes, which isn't supported on wasi.
- run: cargo test --profile ci -p libwild --target wasm32-wasip1

macho-build:
name: Test Mach-O (AArch64)
runs-on: macos-latest
timeout-minutes: 10
steps:
Expand All @@ -110,6 +162,20 @@ jobs:
id: rust-toolchain
- uses: Swatinem/rust-cache@v2
- run: cargo build --profile ci --workspace --no-default-features
- run: cargo test --profile ci --workspace

windows-build:
name: Build Windows (x86_64)
runs-on: windows-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
id: rust-toolchain
- uses: Swatinem/rust-cache@v2
- run: cargo build --profile ci --workspace --no-default-features

minimal-versions:
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -176,70 +242,6 @@ jobs:
- run: echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"
- run: yamlfmt -lint .

riscv-build:
name: RISC-V build
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
id: rust-toolchain
with:
targets: riscv64gc-unknown-linux-gnu
- uses: Swatinem/rust-cache@v2
- run: sudo apt-get update && sudo apt-get install build-essential lld gcc-riscv64-linux-gnu g++-riscv64-linux-gnu
- run: cp -f .cargo/config.toml.cross-riscv .cargo/config.toml
- run: cargo build --target riscv64gc-unknown-linux-gnu

loongarch64-build:
name: LoongArch64 build
runs-on: ubuntu-24.04
timeout-minutes: 10
container:
image: ubuntu:25.10
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- run: apt-get update && apt-get install -y build-essential lld gcc gcc-loongarch64-linux-gnu g++-loongarch64-linux-gnu curl
- uses: dtolnay/rust-toolchain@stable
id: rust-toolchain
with:
targets: loongarch64-unknown-linux-gnu
- uses: Swatinem/rust-cache@v2
- run: cp -f .cargo/config.toml.cross-loongarch64 .cargo/config.toml
- run: cargo build --target loongarch64-unknown-linux-gnu

wasip1-build:
name: wasip1 build
runs-on: ubuntu-24.04
timeout-minutes: 10
container:
image: ubuntu:25.10
steps:
- name: Install xz-utils
run: apt-get update && apt-get install -y xz-utils
- name: Setup Wasmtime
uses: bytecodealliance/actions/wasmtime/setup@v1
with:
version: '43.0.0'
- uses: actions/checkout@v6
with:
persist-credentials: false
- run: apt-get install --update -y build-essential gcc gcc-multilib clang curl
- uses: dtolnay/rust-toolchain@stable
id: rust-toolchain
with:
targets: wasm32-wasip1
- uses: Swatinem/rust-cache@v2
- run: cargo build --target wasm32-wasip1
- run: cp -f .cargo/config.toml.cross-wasm32p1 .cargo/config.toml
# -p libwild prevents integration tests from running. they depend on
# spawning processes, which isn't supported on wasi.
- run: cargo test --profile ci -p libwild --target wasm32-wasip1

spelling:
name: Spell Check with Typos
runs-on: ubuntu-24.04
Expand Down
6 changes: 4 additions & 2 deletions libwild/src/tidy_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ use crate::error::Result;
use std::env;
use std::fs::read_dir;
use std::path::Path;
use std::process::Command;
use std::process::Stdio;

#[test]
#[cfg(target_os = "linux")]
fn check_sources_format() -> Result {
use std::process::Command;
use std::process::Stdio;

if std::env::var_os("WILD_TEST_IGNORE_FORMAT").is_some() {
return Ok(());
}
Expand Down
1 change: 1 addition & 0 deletions linker-diff/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ pub fn decode_insn_with_objdump(insn: &[u8], address: u64, arch: ArchKind) -> Re
}

#[test]
#[cfg(target_os = "linux")]
fn test_align_up() {
// Some distributions don't enable the features in objdump required for disassembly of aarch64,
// so we only check that we can disassemble if we're running on aarch64 or if test
Expand Down
5 changes: 5 additions & 0 deletions wild/tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,11 @@ fn collect_tests(tests: &mut Vec<Trial>, filter: &Filter) -> Result {
let host_arch = get_host_architecture();

for platform in [PlatformKind::Elf, PlatformKind::MachO] {
// Right now, the Mach-O provided Clang and the ld linker do not support the ELF format.
if platform == PlatformKind::Elf && cfg!(target_os = "macos") {
continue;
}

let linkers = platform.available_linkers()?;

let platform_name = platform.to_str();
Expand Down
1 change: 1 addition & 0 deletions wild/tests/sources/macho/trivial/trivial.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//#Object:runtime.c
//#ExpectSym:_main
//#TestUpdateInPlace:true
//#RunEnabled: false

#include "../common/runtime.h"

Expand Down
Loading