diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 826078e..3e29a4f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -27,7 +27,7 @@ on: jobs: check: name: Type checking (${{ matrix.target.name }}) - runs-on: ubuntu-latest + runs-on: ${{ matrix.target.host }} if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) || github.event_name == 'push' }} strategy: matrix: @@ -36,10 +36,19 @@ jobs: # triple: x86_64-pc-windows-gnu - name: Linux triple: x86_64-unknown-linux-gnu + host: ubuntu-latest + - name: Android + triple: aarch64-linux-android + host: ubuntu-latest - name: macOS triple: x86_64-apple-darwin + host: macos-latest + - name: iOS + triple: aarch64-apple-ios + host: macos-latest - name: FreeBSD triple: x86_64-unknown-freebsd + host: ubuntu-latest steps: - name: Checkout sources diff --git a/CHANGELOG.md b/CHANGELOG.md index 05a56d7..a9520e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# Unreleased +- Added support for Android +- Added support for iOS + # 0.1.4 - Modified MacOS implementation to be friendly towards Apple app store review guidelines. diff --git a/Cargo.toml b/Cargo.toml index ddddf14..692bd67 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,5 +14,5 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] -[target.'cfg(any(target_os = "macos", target_os = "freebsd"))'.dependencies] +[target.'cfg(any(target_os = "macos", target_os = "ios", target_os = "freebsd"))'.dependencies] libc = "0.2.107" diff --git a/src/macos.rs b/src/apple.rs similarity index 100% rename from src/macos.rs rename to src/apple.rs diff --git a/src/lib.rs b/src/lib.rs index 7631ead..c213802 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,9 +2,9 @@ use std::num::NonZeroUsize; -#[cfg_attr(target_os = "linux", path = "linux.rs")] +#[cfg_attr(any(target_os = "linux", target_os = "android"), path = "linux.rs")] #[cfg_attr(target_os = "freebsd", path = "freebsd.rs")] -#[cfg_attr(target_os = "macos", path = "macos.rs")] +#[cfg_attr(any(target_os = "macos", target_os = "ios"), path = "apple.rs")] mod imp; /// Obtain the number of threads currently part of the active process. Returns `None` if the number