diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 542e62c..be62411 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -233,8 +233,10 @@ jobs: target: thumbv7neon-unknown-linux-gnueabihf - os: macos-latest target: x86_64-apple-ios - - os: ubuntu-latest - target: x86_64-fortanix-unknown-sgx + # `gethostname` function is not available + # - os: ubuntu-latest + # target: x86_64-fortanix-unknown-sgx + # # `rust-std` seems to be not available? # - os: ubuntu-latest # target: x86_64-unknown-fuchsia @@ -244,8 +246,6 @@ jobs: target: x86_64-pc-solaris - os: ubuntu-latest target: x86_64-unknown-linux-gnux32 - - os: ubuntu-latest - target: x86_64-unknown-redox steps: - uses: actions/checkout@v1 - name: Install Rust toolchain @@ -260,6 +260,36 @@ jobs: run: | cross build --all-features --target=${{ matrix.target }} + tier2_without_host_tools_default_features: + # Matches Rust "Tier 2 with host tools" platform support + # For as much as possible, but where `cross` is needed for cross-compilation + # + # The only difference from the `tier2_without_host_tools` group is that + # no optional crate features are enabled (e.g. Redox has `gethostname(2)`, but not the `sethostname(2)`) + # + # See https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-2-with-host-tools + name: Tier 2 (without Host Tools) + needs: tier1 + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: ubuntu-latest + target: x86_64-unknown-redox + steps: + - uses: actions/checkout@v1 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: 1.67.0 + targets: ${{ matrix.target }} + - uses: taiki-e/install-action@v2 + with: + tool: cross + - name: Run build (default features) + run: | + cross build --target=${{ matrix.target }} + # TODO: Tier 3 # - x86_64-unknown-dragonfly # And other targets that have `std` compiled diff --git a/Cargo.toml b/Cargo.toml index b5fcb9b..6ed3653 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ cfg-if = "^1.0" libc = "^0.2" [target.'cfg(target_os = "windows")'.dependencies] -windows = { version = "^0.51", features = ["Win32_Foundation", "Win32_System_SystemInformation"] } +windows = { version = "^0.52", features = ["Win32_Foundation", "Win32_System_SystemInformation"] } [dev-dependencies] version-sync = "0.9" diff --git a/src/nix.rs b/src/nix.rs index 7dd9980..bfb212a 100644 --- a/src/nix.rs +++ b/src/nix.rs @@ -49,7 +49,8 @@ pub fn set(hostname: &OsStr) -> io::Result<()> { target_os = "freebsd", target_os = "ios", target_os = "macos", - target_os = "solaris" + target_os = "solaris", + target_os = "illumos" )))] #[allow(non_camel_case_types)] type hostname_len_t = libc::size_t; @@ -59,7 +60,8 @@ pub fn set(hostname: &OsStr) -> io::Result<()> { target_os = "freebsd", target_os = "ios", target_os = "macos", - target_os = "solaris" + target_os = "solaris", + target_os = "illumos" ))] #[allow(non_camel_case_types)] type hostname_len_t = libc::c_int;