Skip to content

Commit

Permalink
build script issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrlive committed Jun 8, 2024
1 parent 0b547f6 commit 3d6d56f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,19 @@ jobs:
else
cargo build --all-features --release --target ${{ matrix.target }}
fi
cbindgen -c cbindgen.toml -l C -o target/overtls-ffi.h
cbindgen -c cbindgen.toml -l C --cpp-compat -o ./overtls.h
if [[ "${{ matrix.host_os }}" == "windows-latest" ]]; then
powershell Compress-Archive -Path target/${{ matrix.target }}/release/overtls.exe, ./config.json, target/overtls-ffi.h, target/${{ matrix.target }}/release/overtls.dll -DestinationPath release/overtls-${{ matrix.target }}.zip
powershell Compress-Archive -Path target/${{ matrix.target }}/release/overtls.exe, ./config.json, ./overtls.h, target/${{ matrix.target }}/release/overtls.dll -DestinationPath release/overtls-${{ matrix.target }}.zip
elif [[ "${{ matrix.host_os }}" == "macos-latest" ]]; then
zip -j release/overtls-${{ matrix.target }}.zip target/${{ matrix.target }}/release/overtls ./config.json target/overtls-ffi.h target/${{ matrix.target }}/release/libovertls.dylib
zip -j release/overtls-${{ matrix.target }}.zip target/${{ matrix.target }}/release/overtls ./config.json ./overtls.h target/${{ matrix.target }}/release/libovertls.dylib
if [[ "${{ matrix.target }}" == "x86_64-apple-darwin" ]]; then
./build-aarch64-apple-ios.sh
zip -r release/overtls-aarch64-apple-ios-xcframework.zip ./overtls.xcframework/
./build-apple.sh
zip -r release/overtls-apple-xcframework.zip ./overtls.xcframework/
fi
elif [[ "${{ matrix.host_os }}" == "ubuntu-latest" ]]; then
zip -j release/overtls-${{ matrix.target }}.zip target/${{ matrix.target }}/release/overtls ./config.json target/overtls-ffi.h target/${{ matrix.target }}/release/libovertls.so
zip -j release/overtls-${{ matrix.target }}.zip target/${{ matrix.target }}/release/overtls ./config.json ./overtls.h target/${{ matrix.target }}/release/libovertls.so
fi
if [[ "${{ matrix.target }}" == "x86_64-unknown-linux-gnu" ]]; then
Expand Down
3 changes: 1 addition & 2 deletions build-aarch64-apple-ios-debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ cargo build --target aarch64-apple-ios
echo "Generating includes..."
mkdir -p target/include/
rm -rf target/include/*
cbindgen --config cbindgen.toml -l C -o target/include/overtls.h
cbindgen --config cbindgen.toml -l C --cpp-compat -o target/include/overtls.h
cat > target/include/overtls.modulemap <<EOF
framework module overtls {
umbrella header "overtls.h"
export *
module * { export * }
}
Expand Down
3 changes: 1 addition & 2 deletions build-aarch64-apple-ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ cargo build --release --target aarch64-apple-ios
echo "Generating includes..."
mkdir -p target/include/
rm -rf target/include/*
cbindgen --config cbindgen.toml -l C -o target/include/overtls.h
cbindgen --config cbindgen.toml -l C --cpp-compat -o target/include/overtls.h
cat > target/include/overtls.modulemap <<EOF
framework module overtls {
umbrella header "overtls.h"
export *
module * { export * }
}
Expand Down
3 changes: 1 addition & 2 deletions build-apple.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@ cargo build --release --target aarch64-apple-ios-sim
echo "Generating includes..."
mkdir -p target/include/
rm -rf target/include/*
cbindgen --config cbindgen.toml -l C -o target/include/overtls.h
cbindgen --config cbindgen.toml -l C --cpp-compat -o target/include/overtls.h
cat > target/include/overtls.modulemap <<EOF
framework module overtls {
umbrella header "overtls.h"
export *
module * { export * }
}
Expand Down

0 comments on commit 3d6d56f

Please sign in to comment.