Skip to content

Commit

Permalink
DRTVWR-578: promote actions branch to master
Browse files Browse the repository at this point in the history
  • Loading branch information
nat-goodspeed authored Oct 25, 2023
2 parents 6e93458 + 3e9876e commit a9c6b76
Show file tree
Hide file tree
Showing 8 changed files with 127 additions and 65 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:

- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
18 changes: 18 additions & 0 deletions .github/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
changelog:
exclude:
labels:
- ignore-for-release
authors:
- dependabot
categories:
- title: Breaking Changes 🛠
labels:
- semver-major
- breaking-change
- title: New Features 🎉
labels:
- semver-minor
- enhancement
- title: Other Changes
labels:
- '*'
24 changes: 24 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build
on: [push]
jobs:
build:
strategy:
matrix:
os: [windows-2022, macos-11, ubuntu-22.04]
addrsize: ["64"]
include:
- os: windows-2022
addrsize: "32"
runs-on: ${{ matrix.os }}
steps:
- uses: secondlife/action-autobuild@v3
with:
addrsize: ${{ matrix.addrsize }}
release:
needs: build
runs-on: [ubuntu-latest]
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: secondlife/action-autobuild-release@v1
with:
public: true
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
stage/
zlib-ng/WIN
minizip-ng/unzip.h
minizip-ng/zip.h
minizip-ng/build

*.exe
*.bz2

6 changes: 0 additions & 6 deletions BuildParams

This file was deleted.

6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# 3p-minizip-ng

[minizip-ng][] [autobuild][] package

[minizip-ng]: https://github.com/zlib-ng/minizip-ng
[autobuild]: https://wiki.secondlife.com/wiki/Autobuild
32 changes: 19 additions & 13 deletions autobuild.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" ?>
<llsd>
<map>
<llsd><map>
<key>installables</key>
<map>
<key>zlib-ng</key>
Expand All @@ -24,9 +23,11 @@
<key>archive</key>
<map>
<key>hash</key>
<string>bf306e38bf81c6095e0967bdef6a2445</string>
<string>dacc5f3fb307c4d1292ed1ffb1d595d83599062d</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87759/805718/zlib_ng-2.0.5.563838-darwin64-563838.tar.bz2</string>
<string>https://github.com/secondlife/3p-zlib-ng/releases/download/v1.2.11.zlib-ng.32fd361/zlib_ng-1.2.11.zlib-ng.32fd361-darwin64-32fd361.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
Expand All @@ -36,9 +37,11 @@
<key>archive</key>
<map>
<key>hash</key>
<string>c0ac02d44409dd8c7f69a06580fa3a8c</string>
<string>fba88375e12454ae19f4528e11ffc7ddf7d879ec</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87759/805718/[placeholderforyourbuild]</string>
<string>https://github.com/secondlife/3p-zlib-ng/releases/download/v1.2.11.zlib-ng.32fd361/zlib_ng-1.2.11.zlib-ng.32fd361-linux64-32fd361.tar.zst</string>
</map>
<key>name</key>
<string>linux64</string>
Expand All @@ -48,9 +51,11 @@
<key>archive</key>
<map>
<key>hash</key>
<string>8ffce5bd00e3d5afa8cb39b855237c4a</string>
<string>2b5a50b0a3d31a07bc74cb77871ad195eb97c550</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87761/805730/zlib_ng-2.0.5.563838-windows-563838.tar.bz2</string>
<string>https://github.com/secondlife/3p-zlib-ng/releases/download/v1.2.11.zlib-ng.32fd361/zlib_ng-1.2.11.zlib-ng.32fd361-windows-32fd361.tar.zst</string>
</map>
<key>name</key>
<string>windows</string>
Expand All @@ -60,16 +65,18 @@
<key>archive</key>
<map>
<key>hash</key>
<string>bd103a9129e57f7ea35886bc7750f8a6</string>
<string>ccfca9451063e2d0e95baa73b1ad2054d3e38907</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/87760/805729/zlib_ng-2.0.5.563838-windows64-563838.tar.bz2</string>
<string>https://github.com/secondlife/3p-zlib-ng/releases/download/v1.2.11.zlib-ng.32fd361/zlib_ng-1.2.11.zlib-ng.32fd361-windows64-32fd361.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
</map>
</map>
<key>version</key>
<string>2.0.5.563838</string>
<string>1.2.11.zlib-ng.32fd361</string>
</map>
</map>
<key>package_description</key>
Expand Down Expand Up @@ -193,5 +200,4 @@
<string>autobuild</string>
<key>version</key>
<string>1.3</string>
</map>
</llsd>
</map></llsd>
96 changes: 51 additions & 45 deletions build-cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,30 +30,43 @@ source_environment_tempfile="$stage/source_environment.sh"
"$autobuild" source_environment > "$source_environment_tempfile"
. "$source_environment_tempfile"

# remove_cxxstd
source "$(dirname "$AUTOBUILD_VARIABLES_FILE")/functions"

VERSION_HEADER_FILE="$MINIZLIB_SOURCE_DIR/mz.h"
version=$(sed -n -E 's/#define MZ_VERSION[ ]+[(]"([0-9.]+)"[)]/\1/p' "${VERSION_HEADER_FILE}")
build=${AUTOBUILD_BUILD_ID:=0}
echo "${version}.${build}" > "${stage}/VERSION.txt"

# CMake configuration options for all platforms
config=( \
-DBUILD_SHARED_LIBS=OFF \
-DMZ_BUILD_TESTS=ON \
-DMZ_BZIP2=OFF \
-DMZ_COMPAT=ON \
-DMZ_FETCH_LIBS=OFF \
-DMZ_ICONV=OFF \
-DMZ_LIBBSD=OFF \
-DMZ_LIBCOMP=OFF \
-DMZ_LZMA=OFF \
-DMZ_OPENSSL=OFF \
-DMZ_PKCRYPT=OFF \
-DMZ_SIGNING=OFF \
-DMZ_WZAES=OFF \
-DMZ_ZSTD=OFF \
)

pushd "$MINIZLIB_SOURCE_DIR"
case "$AUTOBUILD_PLATFORM" in

# ------------------------ windows, windows64 ------------------------
windows*)
load_vsvars

cmake -G "$AUTOBUILD_WIN_CMAKE_GEN" . \
-DBUILD_SHARED_LIBS=OFF \
-DMZ_COMPAT=ON \
-DMZ_BUILD_TEST=ON \
-DMZ_FETCH_LIBS=OFF\
-DMZ_BZIP2=OFF \
-DMZ_LIBBSD=OFF \
-DMZ_LZMA=OFF \
-DMZ_OPENSSL=OFF \
-DMZ_PKCRYPT=OFF \
-DMZ_SIGNING=OFF \
-DMZ_WZAES=OFF \
cmake -G "$AUTOBUILD_WIN_CMAKE_GEN" -A "$AUTOBUILD_WIN_VSPLATFORM" . \
-DCMAKE_C_FLAGS:STRING="$LL_BUILD_RELEASE" \
-DCMAKE_CXX_FLAGS:STRING="$LL_BUILD_RELEASE" \
"${config[@]}" \
-DZLIB_INCLUDE_DIRS="$(cygpath -m $stage)/packages/include/zlib-ng/" \
-DZLIB_LIBRARIES="$(cygpath -m $stage)/packages/lib/release/zlib.lib"

Expand All @@ -77,27 +90,30 @@ pushd "$MINIZLIB_SOURCE_DIR"

opts="${TARGET_OPTS:--arch $AUTOBUILD_CONFIGURE_ARCH $LL_BUILD_RELEASE}"

# As of version 3.0.2 (2023-05-18), we get:
# clang: warning: overriding '-mmacosx-version-min=10.13' option
# with '-target x86_64-apple-macos11.7' [-Woverriding-t-option]
# We didn't specify -target explicitly before; try setting it.
# (_find and _test_re from build-variables/functions script)
if idx=$(_find _test_re "-mmacosx-version-min=.*" $opts)
then
optarray=($opts)
versw="${optarray[$idx]}"
minver="${versw#*=}"
optarray+=(-target "x86_64-apple-macos$minver")
opts="${optarray[*]}"
fi

mkdir -p "$stage/lib/release"
rm -rf Resources/ ../Resources tests/Resources/

cmake ../${MINIZLIB_SOURCE_DIR} -GXcode \
-DCMAKE_C_FLAGS:STRING="$opts" \
-DCMAKE_C_FLAGS:STRING="$(remove_cxxstd $opts)" \
-DCMAKE_CXX_FLAGS:STRING="$opts" \
-DBUILD_SHARED_LIBS=OFF \
-DMZ_COMPAT=ON \
-DMZ_BUILD_TEST=ON \
-DMZ_FETCH_LIBS=OFF \
-DMZ_BZIP2=OFF \
-DMZ_LIBBSD=OFF \
-DMZ_LZMA=OFF \
-DMZ_OPENSSL=OFF \
-DMZ_PKCRYPT=OFF \
-DMZ_SIGNING=OFF \
-DMZ_WZAES=OFF \
-DMZ_LIBCOMP=OFF \
"${config[@]}" \
-DCMAKE_INSTALL_PREFIX=$stage \
-DZLIB_INCLUDE_DIRS="$(cygpath -m $stage)/packages/include/zlib-ng/" \
-DZLIB_LIBRARIES="$(cygpath -m $stage)/packages/lib/release/libz.a"
-DZLIB_INCLUDE_DIRS="$stage/packages/include/zlib-ng/" \
-DZLIB_LIBRARIES="$stage/packages/lib/release/libz.a"

cmake --build . --config Release

Expand Down Expand Up @@ -137,11 +153,11 @@ pushd "$MINIZLIB_SOURCE_DIR"
export CXX=/usr/bin/g++-4.6
fi

# Prefer out of source builds
rm -rf build
mkdir -p build
pushd build
# Prefer out of source builds
rm -rf build
mkdir -p build
pushd build
# Default target per autobuild build --address-size
opts="${TARGET_OPTS:--m$AUTOBUILD_ADDRSIZE $LL_BUILD_RELEASE}"

Expand All @@ -155,19 +171,9 @@ pushd "$MINIZLIB_SOURCE_DIR"
fi

cmake ${top}/${MINIZLIB_SOURCE_DIR} -G"Unix Makefiles" \
-DCMAKE_C_FLAGS:STRING="$opts" \
-DCMAKE_C_FLAGS:STRING="$(remove_cxxstd $opts)" \
-DCMAKE_CXX_FLAGS:STRING="$opts" \
-DBUILD_SHARED_LIBS=OFF \
-DMZ_COMPAT=ON \
-DMZ_BUILD_TEST=ON \
-DMZ_FETCH_LIBS=OFF \
-DMZ_BZIP2=OFF \
-DMZ_LIBBSD=OFF \
-DMZ_LZMA=OFF \
-DMZ_OPENSSL=OFF \
-DMZ_PKCRYPT=OFF \
-DMZ_SIGNING=OFF \
-DMZ_WZAES=OFF \
"${config[@]}" \
-DCMAKE_INSTALL_PREFIX=$stage \
-DZLIB_INCLUDE_DIRS="$stage/packages/include/zlib-ng/" \
-DZLIB_LIBRARIES="$stage/packages/lib/release/libz.a"
Expand All @@ -185,7 +191,7 @@ pushd "$MINIZLIB_SOURCE_DIR"
mkdir -p "$stage/include/minizip-ng"
cp -a ${top}/${MINIZLIB_SOURCE_DIR}/*.h "$stage/include/minizip-ng"

popd
popd
;;
esac

Expand Down

0 comments on commit a9c6b76

Please sign in to comment.