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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ jobs:
##### KOTLIN BUILD #####
build_kotlin:
needs: setup_config
runs-on: "ubuntu-latest"
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
with:
Expand Down
41 changes: 34 additions & 7 deletions .github/workflows/native/native-build-linux/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ runs:
name: config.txt
path: ./wrappers/csharp

- uses: actions/setup-python@v5
with:
python-version: "3.7"

- name: Installing dependencies
shell: bash
run: |
Expand Down Expand Up @@ -44,7 +40,19 @@ runs:
- name: Building Linux
working-directory: ./wrappers/csharp
shell: bash
run: python GeneratePackage.py -p linux
run: |
cargo build -p devolutions-crypto-ffi --release --target=i686-unknown-linux-gnu
cargo build -p devolutions-crypto-ffi --release --target=x86_64-unknown-linux-gnu
cargo build -p devolutions-crypto-ffi --release --target=aarch64-unknown-linux-gnu

- name: Copy Linux Natives
shell: bash
run: |
mkdir ./wrappers/csharp/linux

cp ./target/i686-unknown-linux-gnu/release/libdevolutions_crypto_ffi.so ./wrappers/csharp/linux/libDevolutionsCrypto-x86.so
cp ./target/x86_64-unknown-linux-gnu/release/libdevolutions_crypto_ffi.so ./wrappers/csharp/linux/libDevolutionsCrypto-x64.so
cp ./target/aarch64-unknown-linux-gnu/release/libdevolutions_crypto_ffi.so ./wrappers/csharp/linux/libDevolutionsCrypto-arm64.so

- name: Configure Android NDK
shell: bash
Expand Down Expand Up @@ -72,16 +80,35 @@ runs:
ar = \"$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android-ar\"
linker = \"$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android21-clang\"" >> ./.cargo/config.toml

- name: Build Android package

- name: Building Android
working-directory: ./wrappers/csharp
shell: bash
run: |
export ANDROID_ROOT="/usr/local/lib/android"
export ANDROID_SDK_ROOT="${ANDROID_ROOT}/sdk"
export ANDROID_NDK=$ANDROID_SDK_ROOT/ndk-bundle
ln -sfn $ANDROID_SDK_ROOT/ndk/27.2.12479018 $ANDROID_NDK

cargo build -p devolutions-crypto-ffi --release --target=aarch64-linux-android
cargo build -p devolutions-crypto-ffi --release --target=armv7-linux-androideabi
cargo build -p devolutions-crypto-ffi --release --target=i686-linux-android
cargo build -p devolutions-crypto-ffi --release --target=x86_64-linux-android

- name: Copy Android Natives
shell: bash
run: |
mkdir ./wrappers/csharp/android
mkdir ./wrappers/csharp/android/aarch64
mkdir ./wrappers/csharp/android/armv7
mkdir ./wrappers/csharp/android/i686
mkdir ./wrappers/csharp/android/x86_64

cp ./target/aarch64-linux-android/release/libdevolutions_crypto_ffi.so ./wrappers/csharp/android/aarch64/libDevolutionsCrypto.so
cp ./target/armv7-linux-androideabi/release/libdevolutions_crypto_ffi.so ./wrappers/csharp/android/armv7/libDevolutionsCrypto.so
cp ./target/i686-linux-android/release/libdevolutions_crypto_ffi.so ./wrappers/csharp/android/i686/libDevolutionsCrypto.so
cp ./target/x86_64-linux-android/release/libdevolutions_crypto_ffi.so ./wrappers/csharp/android/x86_64/libDevolutionsCrypto.so

python GeneratePackage.py -p android

- uses: actions/upload-artifact@v4.3.6
with:
Expand Down
26 changes: 18 additions & 8 deletions .github/workflows/native/native-build-macos/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,33 @@ runs:
source $HOME/.cargo/env
cargo test

- name: Building Mac Modern
- name: Build macOS Natives
working-directory: ./wrappers/csharp
shell: bash
run: |
source $HOME/.cargo/env
python3 GeneratePackage.py -p mac-modern
cargo build -p devolutions-crypto-ffi --release --target=x86_64-apple-darwin
cargo build -p devolutions-crypto-ffi --release --target=aarch64-apple-darwin

- name: Copy macOS Natives
shell: bash
run: |
mkdir ./wrappers/csharp/macos
mkdir ./wrappers/csharp/macos/x86_64
mkdir ./wrappers/csharp/macos/aarch64

cp ./target/x86_64-apple-darwin/release/libdevolutions_crypto_ffi.dylib ./wrappers/csharp/macos/x86_64/libDevolutionsCrypto.dylib
cp ./target/aarch64-apple-darwin/release/libdevolutions_crypto_ffi.dylib ./wrappers/csharp/macos/aarch64/libDevolutionsCrypto.dylib

- name: Prepare folder structure
working-directory: ./
shell: bash
run: |
mv wrappers/csharp/macos-modern wrappers/csharp/macos-modern-temp
mkdir -p wrappers/csharp/macos-modern/macos-modern
mv wrappers/csharp/macos-modern-temp/* wrappers/csharp/macos-modern/macos-modern/
rmdir wrappers/csharp/macos-modern-temp
mv wrappers/csharp/macos wrappers/csharp/macos-temp
mkdir -p wrappers/csharp/macos/macos
mv wrappers/csharp/macos-temp/* wrappers/csharp/macos/macos/
rmdir wrappers/csharp/macos-temp

- uses: actions/upload-artifact@v4.3.6
with:
name: native-macos
path: wrappers/csharp/macos-modern/
path: wrappers/csharp/macos/
32 changes: 19 additions & 13 deletions .github/workflows/native/native-build-windows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,6 @@ runs:
name: config.txt
path: ./wrappers/csharp

- uses: actions/setup-python@v5
with:
python-version: "3.7"

- name: Setting up PATH environment variable
shell: bash
run: |
ls "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\Roslyn"
echo "c:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\Roslyn" >> $GITHUB_PATH

- name: Installing rust targets
shell: bash
run: |
Expand All @@ -33,17 +23,33 @@ runs:
run: |
cargo test

- name: Building WIN
- name: Build Windows Natives
working-directory: ./wrappers/csharp
shell: bash
run: |
python GeneratePackage.py -p windows
cargo build -p devolutions-crypto-ffi --release --target=x86_64-pc-windows-msvc
cargo build -p devolutions-crypto-ffi --release --target=i686-pc-windows-msvc
cargo build -p devolutions-crypto-ffi --release --target=aarch64-pc-windows-msvc

- name: Copy Windows Natives
shell: bash
run: |
mkdir ./wrappers/csharp/windows

cp ./target/x86_64-pc-windows-msvc/release/devolutions_crypto_ffi.dll ./wrappers/csharp/windows/DevolutionsCrypto-x64.dll
cp ./target/i686-pc-windows-msvc/release/devolutions_crypto_ffi.dll ./wrappers/csharp/windows/DevolutionsCrypto-x86.dll
cp ./target/aarch64-pc-windows-msvc/release/devolutions_crypto_ffi.dll ./wrappers/csharp/windows/DevolutionsCrypto-arm64.dll

- name: Building DOTNET CORE
working-directory: ./wrappers/csharp
shell: bash
run: |
python GeneratePackage.py -p dotnet-core
VERSION_MANAGED=$(grep 'version' config.txt | cut -d '=' -f2 | tr -d ' "')
VERSION_NATIVE=$(grep 'package.version = "' ../../Cargo.toml | cut -d '"' -f2)

sed -i -e "s/||MANAGED_VERSION||/${VERSION_MANAGED}/g" -e "s/||NATIVE_VERSION||/${VERSION_NATIVE}/g" ./src/Native.cs

dotnet build ./src/devolutions-crypto.csproj -p:Version="$VERSION_MANAGED" --configuration Release --output ./dotnet-core/bin

- uses: actions/upload-artifact@v4.3.6
with:
Expand Down
50 changes: 32 additions & 18 deletions .github/workflows/python/build/linux/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,22 @@ runs:
steps:
- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.13"

- name: Installing dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install nuget gcc-multilib software-properties-common
sudo apt-get install -y gcc-aarch64-linux-gnu

- name: Install rust
shell: bash
run: |
rustup update
rustup target add x86_64-unknown-linux-gnu
rustup target add i686-unknown-linux-gnu
rustup target add aarch64-unknown-linux-gnu

- name: Install Maturin
working-directory: ./python
Expand All @@ -28,50 +31,61 @@ runs:
working-directory: "./python"
shell: bash

- name: Building 3.13 wheel
working-directory: ./python
shell: bash
run: |
maturin build -i 3.13 --release --target=x86_64-unknown-linux-gnu
maturin build -i 3.13 --release --target=i686-unknown-linux-gnu
maturin build -i 3.13 --release --target=aarch64-unknown-linux-gnu

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Building x86_64 3.12 Wheel
- name: Building 3.12 wheel
working-directory: ./python
shell: bash
run: maturin build -i python --release --target=x86_64-unknown-linux-gnu
run: |
maturin build -i 3.12 --release --target=x86_64-unknown-linux-gnu
maturin build -i 3.12 --release --target=i686-unknown-linux-gnu
maturin build -i 3.12 --release --target=aarch64-unknown-linux-gnu

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Building x86_64 3.11 Wheel
- name: Building 3.11 Wheel
working-directory: ./python
shell: bash
run: maturin build -i python --release --target=x86_64-unknown-linux-gnu
run: |
maturin build -i 3.11 --release --target=x86_64-unknown-linux-gnu
maturin build -i 3.11 --release --target=i686-unknown-linux-gnu
maturin build -i 3.11 --release --target=aarch64-unknown-linux-gnu

- uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Building x86_64 3.10 Wheel
- name: Building 3.10 Wheel
working-directory: ./python
shell: bash
run: maturin build -i python --release --target=x86_64-unknown-linux-gnu
run: |
maturin build -i 3.10 --release --target=x86_64-unknown-linux-gnu
maturin build -i 3.10 --release --target=i686-unknown-linux-gnu
maturin build -i 3.10 --release --target=aarch64-unknown-linux-gnu

- uses: actions/setup-python@v5
with:
python-version: "3.9"

- name: Building x86_64 3.9 Wheel
- name: Building 3.9 Wheel
working-directory: ./python
shell: bash
run: maturin build -i python --release --target=x86_64-unknown-linux-gnu

- uses: actions/setup-python@v5
with:
python-version: "3.8"

- name: Building x86_64 3.8 Wheel
working-directory: ./python
shell: bash
run: maturin build -i python --release --target=x86_64-unknown-linux-gnu
run: |
maturin build -i 3.9 --release --target=x86_64-unknown-linux-gnu
maturin build -i 3.9 --release --target=i686-unknown-linux-gnu
maturin build -i 3.9 --release --target=aarch64-unknown-linux-gnu

- name: Place Artifacts
shell: bash
Expand Down
52 changes: 23 additions & 29 deletions .github/workflows/python/build/macos/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ runs:
steps:
- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.13"

- name: Install rust
shell: bash
Expand All @@ -15,79 +15,73 @@ runs:
source $HOME/.cargo/env

rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-darwin

- name: Install maturin
working-directory: ./python
shell: bash
run: pip install maturin

- uses: actions/setup-python@v5
with:
python-version: "3.12"
run: pip install maturin --disable-pip-version-check

- name: Building aarch64 3.12 Wheel
- name: Building 3.13 Wheel
working-directory: ./python
shell: bash
run: |
source $HOME/.cargo/env

maturin build --release -i python --target=aarch64-apple-darwin

- name: Building x86_64 3.12 Wheel
working-directory: ./python
shell: bash
run: |
source $HOME/.cargo/env

maturin build --release -i python --target=x86_64-apple-darwin
maturin build --release -i 3.13 --target=x86_64-apple-darwin
maturin build --release -i 3.13 --target=aarch64-apple-darwin

- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"

- name: Building x86_64 3.11 Wheel
- name: Building 3.12 Wheel
working-directory: ./python
shell: bash
run: |
source $HOME/.cargo/env

maturin build --release -i python --target=x86_64-apple-darwin
maturin build --release -i 3.12 --target=x86_64-apple-darwin
maturin build --release -i 3.12 --target=aarch64-apple-darwin

- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"

- name: Building x86_64 3.10 Wheel
- name: Building 3.11 Wheel
working-directory: ./python
shell: bash
run:
run: |
source $HOME/.cargo/env

maturin build --release -i python --target=x86_64-apple-darwin
maturin build --release -i 3.11 --target=x86_64-apple-darwin
maturin build --release -i 3.11 --target=aarch64-apple-darwin

- uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version: "3.10"

- name: Building x86_64 3.9 Wheel
- name: Building 3.10 Wheel
working-directory: ./python
shell: bash
run: |
source $HOME/.cargo/env

maturin build --release -i python --target=x86_64-apple-darwin
maturin build --release -i 3.10 --target=x86_64-apple-darwin
maturin build --release -i 3.10 --target=aarch64-apple-darwin

- uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.9"

- name: Building x86_64 3.8 Wheel
- name: Building 3.9 Wheel
working-directory: ./python
shell: bash
run: |
source $HOME/.cargo/env

maturin build --release -i python --target=x86_64-apple-darwin
maturin build --release -i 3.9 --target=x86_64-apple-darwin
maturin build --release -i 3.9 --target=aarch64-apple-darwin

- name: Place Artifacts
shell: bash
Expand Down
Loading