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
12 changes: 5 additions & 7 deletions .github/workflows/publish-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
with:
ref: ${{ env.PACKAGE_CHECKOUT_REF }}
- name: Install Rust
run: rustup toolchain install stable --profile minimal
run: rustup toolchain install 1.87.0 --profile minimal
- name: Build crate archives without publishing
env:
RUSTC_BOOTSTRAP: 1
Expand All @@ -74,7 +74,7 @@ jobs:
name: release-crates
path: artifacts/crates
- name: Install Rust
run: rustup toolchain install stable --profile minimal
run: rustup toolchain install 1.87.0 --profile minimal
- name: Consume the exact crate archives in a clean project
run: tests/package/crates/smoke.sh artifacts/crates "${{ inputs['expected-version'] }}"

Expand Down Expand Up @@ -107,8 +107,7 @@ jobs:
- name: Install Rust target
shell: bash
run: |
rustup toolchain install stable --profile minimal --target "${{ matrix.target }}"
rustup default stable
rustup toolchain install 1.87.0 --profile minimal --target "${{ matrix.target }}"
- name: Install Zig
if: matrix.target == 'aarch64-unknown-linux-gnu' || contains(matrix.target, 'musl')
uses: goto-bus-stop/setup-zig@abea47f85e598557f500fa1fd2ab7464fcb39406 # v2.2.1
Expand Down Expand Up @@ -352,7 +351,7 @@ jobs:
with:
python-version: '3.12'
- name: Install Rust for the isolated sdist build
run: rustup toolchain install stable --profile minimal
run: rustup toolchain install 1.87.0 --profile minimal
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: release-python-sdist
Expand Down Expand Up @@ -382,8 +381,7 @@ jobs:
- name: Install Rust target
shell: bash
run: |
rustup toolchain install stable --profile minimal --target "${{ matrix.target }}"
rustup default stable
rustup toolchain install 1.87.0 --profile minimal --target "${{ matrix.target }}"
- name: Build both FFI library kinds
run: cargo build --locked --release -p stdbr-ffi --target "${{ matrix.target }}"
- name: Create an archive with every required library and the ABI snapshot
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ jobs:
name: release-crates
path: artifacts/crates
- name: Install Rust
run: rustup toolchain install stable --profile minimal
run: rustup toolchain install 1.87.0 --profile minimal
- name: Publish packaged crates if absent
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license.workspace = true
description.workspace = true
repository.workspace = true
homepage.workspace = true
readme.workspace = true
readme = "README.md"
keywords.workspace = true
categories.workspace = true

Expand Down
13 changes: 9 additions & 4 deletions tests/package/ffi/smoke.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,22 @@ try {
}

$env:PATH = "$packageDirectory;$env:PATH"
Add-Type @'
$probe = @'
Add-Type @"
using System.Runtime.InteropServices;
public static class StdbrFfi {
[DllImport("stdbr_ffi.dll", CallingConvention = CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool stdbr_cpf_is_valid([MarshalAs(UnmanagedType.LPStr)] string value);
}
"@
if (-not [StdbrFfi]::stdbr_cpf_is_valid("52998224725")) {
throw "stdbr_cpf_is_valid rejected a valid CPF"
}
'@
if (-not [StdbrFfi]::stdbr_cpf_is_valid("52998224725")) {
throw "stdbr_cpf_is_valid rejected a valid CPF"
}
$encodedProbe = [Convert]::ToBase64String([Text.Encoding]::Unicode.GetBytes($probe))
pwsh -NoLogo -NoProfile -NonInteractive -EncodedCommand $encodedProbe
if ($LASTEXITCODE -ne 0) { throw "FFI probe failed" }
} finally {
Remove-Item -Recurse -Force $temporaryDirectory
}
Loading