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 735d1d3 + de53f55 commit 666779d
Show file tree
Hide file tree
Showing 331 changed files with 5,986 additions and 1,916 deletions.
12 changes: 12 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:

- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly

- package-ecosystem: pip
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:
- '*'
30 changes: 30 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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:
- name: Install nasm
if: runner.os == 'Windows'
run: |
choco install nasm -y --no-progress
Add-Content $env:GITHUB_PATH "C:\Program Files\NASM"
- 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
7 changes: 0 additions & 7 deletions BuildParams

This file was deleted.

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

[Autobuild][]-packaged [openssl][]

[Autobuild]: https://wiki.secondlife.com/wiki/Autobuild
[openssl]: https://www.openssl.org/
41 changes: 29 additions & 12 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,21 +23,39 @@
<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>
</map>
<key>linux64</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>fba88375e12454ae19f4528e11ffc7ddf7d879ec</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
<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>
</map>
<key>windows</key>
<map>
<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 @@ -48,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 @@ -104,7 +123,6 @@
<array>
<string>include/openssl/*.h</string>
<string>LICENSES/openssl.txt</string>
<string>docs/openssl/README.Linden</string>
</array>
<key>name</key>
<string>common</string>
Expand Down Expand Up @@ -222,5 +240,4 @@
<string>autobuild</string>
<key>version</key>
<string>1.3</string>
</map>
</llsd>
</map></llsd>
77 changes: 25 additions & 52 deletions build-cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ source_environment_tempfile="$stage/source_environment.sh"
"$autobuild" source_environment > "$source_environment_tempfile"
. "$source_environment_tempfile"

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

OPENSSL_SOURCE_DIR="openssl"

raw_version=$(perl -ne 's/#\s*define\s+OPENSSL_VERSION_NUMBER\s+([\d]+)/$1/ && print' "${OPENSSL_SOURCE_DIR}/include/openssl/opensslv.h")
Expand Down Expand Up @@ -85,7 +88,7 @@ pushd "$OPENSSL_SOURCE_DIR"
targetname=VC-WIN64A
fi

# configre won't work with VC-* builds undex cygwin's perl, use window's one
# configure won't work with VC-* builds undex cygwin's perl, use window's one

# Set CFLAG directly, rather than on the Configure command line.
# Configure promises to pass through -switches, but is completely
Expand All @@ -95,35 +98,11 @@ pushd "$OPENSSL_SOURCE_DIR"
# CFLAG can accept /switches and correctly pass them to cl.exe.
export CFLAG="$LL_BUILD_RELEASE"

# disable idea cypher per Phoenix's patent concerns (DEV-22827)
# no-asm disables the need for NASM
/cygdrive/c/Strawberry/perl/bin/perl Configure "$targetname" no-idea zlib threads -DNO_WINDOWS_BRAINDEATH \
--with-zlib-include="$(cygpath -w "$stage/packages/include/zlib-ng")" \
--with-zlib-lib="$(cygpath -w "$stage/packages/lib/release/zlib.lib")"

# We've observed some weird failures in which the PATH is too big
# to be passed into cmd.exe! When that gets munged, we start
# seeing errors like failing to understand the 'perl' command --
# which we *just* successfully used. Thing is, by this point in
# the script we've acquired a shocking number of duplicate
# entries. Dedup the PATH using Python's OrderedDict, which
# preserves the order in which you insert keys.
# We find that some of the Visual Studio PATH entries appear both
# with and without a trailing slash, which is pointless. Strip
# those off and dedup what's left.
# Pass the existing PATH as an explicit argument rather than
# reading it from the environment to bypass the fact that cygwin
# implicitly converts PATH to Windows form when running a native
# executable. Since we're setting bash's PATH, leave everything in
# cygwin form. That means splitting and rejoining on ':' rather
# than on os.pathsep, which on Windows is ';'.
# Use python -u, else the resulting PATH will end with a spurious '\r'.
export PATH="$(python -u -c "import sys
from collections import OrderedDict
print(':'.join(OrderedDict((dir.rstrip('/'), 1) for dir in sys.argv[1].split(':'))))" "$PATH")"


# Define PERL for nmake to use
# Define PERL for nmake to use
PERL="c:/Strawberry/perl/bin"

nmake
Expand All @@ -144,27 +123,20 @@ print(':'.join(OrderedDict((dir.rstrip('/'), 1) for dir in sys.argv[1].split(':'
# libssl.lib is for dll import. We probably don't care about
# _static variant since we need a dll, include just in case

if [ "$AUTOBUILD_ADDRSIZE" = 32 ]
then
mv libssl-1_1.dll $stage/lib/release/.
mv libssl-1_1.pdb $stage/lib/release/.
mv libssl_static.lib $stage/lib/release/.
mv libssl.lib $stage/lib/release/.
mv libcrypto-1_1.dll $stage/lib/release/.
mv libcrypto-1_1.pdb $stage/lib/release/.
mv libcrypto_static.lib $stage/lib/release/.
mv libcrypto.lib $stage/lib/release/.
else
mv libssl-1_1-x64.dll $stage/lib/release/.
mv libssl-1_1-x64.pdb $stage/lib/release/.
mv libssl_static.lib $stage/lib/release/.
mv libssl.lib $stage/lib/release/.
mv libcrypto-1_1-x64.dll $stage/lib/release/.
mv libcrypto-1_1-x64.pdb $stage/lib/release/.
mv libcrypto_static.lib $stage/lib/release/.
mv libcrypto.lib $stage/lib/release/.
if [ "$AUTOBUILD_ADDRSIZE" = 64 ]
then sfx="-x64"
else sfx=""
fi

mv libssl-1_1$sfx.dll $stage/lib/release/.
mv libssl-1_1$sfx.pdb $stage/lib/release/.
mv libssl_static.lib $stage/lib/release/.
mv libssl.lib $stage/lib/release/.
mv libcrypto-1_1$sfx.dll $stage/lib/release/.
mv libcrypto-1_1$sfx.pdb $stage/lib/release/.
mv libcrypto_static.lib $stage/lib/release/.
mv libcrypto.lib $stage/lib/release/.

;;

darwin*)
Expand Down Expand Up @@ -195,9 +167,10 @@ print(':'.join(OrderedDict((dir.rstrip('/'), 1) for dir in sys.argv[1].split(':'
# Anyway, selection of $targetname (below) appears to handle the
# -arch switch implicitly.
opts="${TARGET_OPTS:-$LL_BUILD_RELEASE}"
opts="$(remove_cxxstd $opts)"
# As of 2017-09-08:
# clang: error: unknown argument: '-gdwarf-with-dsym'
opts="${opts/-gdwarf-with-dsym/-gdwarf-2}"
opts="$(replace_switch -gdwarf-with-dsym -gdwarf-2 $opts)"
export CFLAG="$opts"
export LDFLAGS="-Wl,-headerpad_max_install_names"

Expand All @@ -219,18 +192,18 @@ print(':'.join(OrderedDict((dir.rstrip('/'), 1) for dir in sys.argv[1].split(':'
# Flush 'pack' array to the next entry of 'packed'.
# ${pack[*]} concatenates all of pack's entries into a single
# string separated by the first char from $IFS.
packed[${#packed[*]}]="${pack[*]:-}"
packed+=("${pack[*]:-}")
pack=()
}
for opt in $opts $LDFLAGS
do
if [ "${opt#-}" != "$opt" ]
if [ "x${opt#-}" != "x$opt" ]
then
# 'opt' does indeed start with dash.
flush
fi
# append 'opt' to 'pack' array
pack[${#pack[*]}]="$opt"
pack+=("$opt")
done
# When we exit the above loop, we've got one more pending entry in
# 'pack'. Flush that too.
Expand All @@ -245,7 +218,7 @@ print(':'.join(OrderedDict((dir.rstrip('/'), 1) for dir in sys.argv[1].split(':'
--with-zlib-lib="$stage/packages/lib/release" \
"${packed[@]}"
make depend
make
make -j$(nproc)
# Avoid plain 'make install' because, at least on Yosemite,
# installing the man pages into the staging area creates problems
# due to the number of symlinks. Thanks to Cinder for suggesting
Expand Down Expand Up @@ -288,6 +261,7 @@ print(':'.join(OrderedDict((dir.rstrip('/'), 1) for dir in sys.argv[1].split(':'

# Default target per AUTOBUILD_ADDRSIZE
opts="${TARGET_OPTS:--m$AUTOBUILD_ADDRSIZE $LL_BUILD_RELEASE}"
opts="$(remove_cxxstd $opts)"

# Handle any deliberate platform targeting
if [ -z "${TARGET_CPPFLAGS:-}" ]; then
Expand Down Expand Up @@ -323,7 +297,7 @@ print(':'.join(OrderedDict((dir.rstrip('/'), 1) for dir in sys.argv[1].split(':'
--with-zlib-include="$stage/packages/include/zlib-ng" \
--with-zlib-lib="$stage"/packages/lib/release/
make depend
make
make -j$(nproc)
make install

# conditionally run unit tests
Expand All @@ -345,4 +319,3 @@ print(':'.join(OrderedDict((dir.rstrip('/'), 1) for dir in sys.argv[1].split(':'
popd

mkdir -p "$stage"/docs/openssl/
cp -a README.Linden "$stage"/docs/openssl/
Loading

0 comments on commit 666779d

Please sign in to comment.