Skip to content

Commit

Permalink
1.6.3
Browse files Browse the repository at this point in the history
* musl build?

* name builds

* version stamp

* SupportsNative should return false if library cannot be loaded

* update release notes
  • Loading branch information
aloneguid authored Oct 14, 2024
1 parent 270eb5e commit 8b0d4d8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: '🏦 Build'

env:
VERSION: 1.6.2
# PACKAGE_SUFFIX: '-pre.1'
PACKAGE_SUFFIX: ''
VERSION: 1.6.3
PACKAGE_SUFFIX: '-pre.1'
# PACKAGE_SUFFIX: ''
ASM_VERSION: 1.0.0
BUILD_TYPE: Release
VCPKG_HASH: 0f88ecb8528605f91980b90a2c5bad88e3cb565f
Expand All @@ -27,18 +27,28 @@ jobs:
matrix:
include:
- os: ubuntu-20.04
name: Linux x64
arch: x64
vcpkg_triplet: x64-linux
vcpkg_config: RelWithDebInfo
dotnet_rid: linux-x64
- os: ubuntu-22.04
name: Linux x64 musl
arch: x64
vcpkg_triplet: x64-linux
vcpkg_config: RelWithDebInfo
dotnet_rid: linux-musl-x64
cmake_options: -D CMAKE_C_FLAGS="-static -Os"
- os: ubuntu-20.04
name: Linux ARM
arch: arm64
vcpkg_triplet: arm64-linux
vcpkg_config: RelWithDebInfo
dotnet_rid: linux-arm64
no_native_tests: true
cmake_options: -D CMAKE_SYSTEM_PROCESSOR=aarch64 -D CMAKE_C_COMPILER=$(which aarch64-linux-gnu-gcc) -D CMAKE_CXX_COMPILER=$(which aarch64-linux-gnu-g++)
- os: windows-latest
name: Windows x64
arch: x64
vcpkg_triplet: x64-windows-static
vcpkg_config: Release
Expand All @@ -51,14 +61,15 @@ jobs:
# dotnet_rid: win-x86
# cmake_options: -D CMAKE_GENERATOR_PLATFORM=x86
- os: macos-latest
name: MacOS ARM
arch: arm64
vcpkg_triplet: arm64-osx
vcpkg_config: RelWithDebInfo
dotnet_rid: osx-arm64
cmake_options: -D CMAKE_OSX_ARCHITECTURES=arm64

fail-fast: false
name: 'build: ${{ matrix.os }} (${{ matrix.arch }})'
name: 'build: ${{ matrix.name }}'

env:
VCPKG_DEFAULT_VCPKG_TRIPLET: ${{ matrix.vcpkg_triplet }}
Expand Down
5 changes: 5 additions & 0 deletions docs/release-notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.6.3

- Native build for Linux [musl](https://wiki.musl-libc.org/projects-using-musl.html) runtime.
- Fixed regression - when native library cannot be loaded, the entire compression fails.

## 1.6.2

- Improvement: native library can return it's version.
Expand Down
7 changes: 5 additions & 2 deletions managed/IronCompress/Iron.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,15 @@ public static bool SupportsManaged(Codec c) {
}

public static bool SupportsNative(Codec c) {
if(!IsNativeLibraryAvailable) {
return false;
}
return Native.iron_is_supported((int)c);
}

public static string GetNativeVersion() {
public static string? GetNativeVersion() {
IntPtr ptr = Native.iron_version();
string version = Marshal.PtrToStringAnsi(ptr);
string? version = Marshal.PtrToStringAnsi(ptr);
return version;
}

Expand Down

0 comments on commit 8b0d4d8

Please sign in to comment.