Skip to content

Commit

Permalink
Fix the illumos and redox CI jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
svartalf committed Mar 31, 2024
1 parent 554b306 commit b1f8e48
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 6 deletions.
38 changes: 34 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion src/nix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,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;
Expand Down

0 comments on commit b1f8e48

Please sign in to comment.