Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add github actions, linux64 config #1

Merged
merged 7 commits into from
Sep 8, 2023
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
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:
- '*'
35 changes: 35 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build
on:
pull_request:
push:
branches: [main, actions]
tags: ['v*']
jobs:
build:
strategy:
matrix:
os: [windows-2022, macos-11, ubuntu-22.04]
addrsize: ["64"]
runs-on: ${{ matrix.os }}
steps:
- name: Setup Linux Build Dependencies
if: ${{ runner.os == 'Linux' }}
run: sudo apt-get install ninja-build
- name: Setup macOS Build Dependencies
if: ${{ runner.os == 'macOS' }}
run: brew install ninja
- name: Setup Windows Build Dependencies
if: ${{ runner.os == 'Windows' }}
run: choco install ninja
- name: Build with autobuild
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@v2
with:
public: true
10 changes: 0 additions & 10 deletions .gitlab-ci.yml

This file was deleted.

1 change: 0 additions & 1 deletion README

This file was deleted.

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

This is a fork of [Alchemy's](https://www.alchemyviewer.org/) [3p-SDL2](https://git.alchemyviewer.org/alchemy/thirdparty/3p-sdl2)
repository configured to build and package using [autobuild](https://wiki.secondlife.com/wiki/Autobuild).

[Simple DirectMedia Layer](SDL/docs/README.md) is a cross-platform development library designed
to provide low level access to audio, keyboard, mouse, joystick, and graphics
hardware via OpenGL and Direct3D.

# How to build:

* Install [autobuild](https://wiki.secondlife.com/wiki/Autobuild) utility.
* Invoke autobuild at the command line:
<pre>
autobuild build
autobuild package
</pre>

That will produce a bundled asset of SDL2 libs and header files called something like: `SDL2-2.24.1-linux-012345678.tar.bz2`
12 changes: 6 additions & 6 deletions autobuild.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<key>name</key>
<string>common</string>
</map>
<key>darwin</key>
<key>darwin64</key>
<map>
<key>configurations</key>
<map>
Expand All @@ -65,9 +65,9 @@
<string>lib/debug/*.*</string>
</array>
<key>name</key>
<string>darwin</string>
<string>darwin64</string>
</map>
<key>linux</key>
<key>linux64</key>
<map>
<key>configurations</key>
<map>
Expand All @@ -88,9 +88,9 @@
<string>lib/debug/*.so*</string>
</array>
<key>name</key>
<string>linux</string>
<string>linux64</string>
</map>
<key>windows</key>
<key>windows64</key>
<map>
<key>configurations</key>
<map>
Expand All @@ -111,7 +111,7 @@
<string>lib/debug/*.*</string>
</array>
<key>name</key>
<string>windows</string>
<string>windows64</string>
</map>
</map>
<key>version_file</key>
Expand Down
16 changes: 8 additions & 8 deletions build-cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ case "$AUTOBUILD_PLATFORM" in
mkdir -p "build_debug"
pushd "build_debug"
cmake .. -G "$AUTOBUILD_WIN_CMAKE_GEN" -A "$AUTOBUILD_WIN_VSPLATFORM" -DCMAKE_INSTALL_PREFIX=$(cygpath -m $stage)/debug

cmake --build . --config Debug
cmake --install . --config Debug

Expand All @@ -68,15 +68,15 @@ case "$AUTOBUILD_PLATFORM" in
mkdir -p "build_release"
pushd "build_release"
cmake .. -G "$AUTOBUILD_WIN_CMAKE_GEN" -A "$AUTOBUILD_WIN_VSPLATFORM" -DCMAKE_INSTALL_PREFIX=$(cygpath -m $stage)/release

cmake --build . --config Release
cmake --install . --config Release

# conditionally run unit tests
if [ "${DISABLE_UNIT_TESTS:-0}" = "0" ]; then
ctest -C Release
fi

cp $stage/release/bin/*.dll $stage/lib/release/
cp $stage/release/lib/*.lib $stage/lib/release/
cp $stage/release/include/SDL2/*.h $stage/include/SDL2/
Expand Down Expand Up @@ -205,9 +205,9 @@ case "$AUTOBUILD_PLATFORM" in
# but which do nonetheless.
#
unset DISTCC_HOSTS CC CXX CFLAGS CPPFLAGS CXXFLAGS

# Default target per autobuild build --address-size
opts="${TARGET_OPTS:--m$AUTOBUILD_ADDRSIZE}"
opts="${TARGET_OPTS:--m64}"
DEBUG_COMMON_FLAGS="$opts -Og -g -fPIC -DPIC"
RELEASE_COMMON_FLAGS="$opts -O3 -g -fPIC -DPIC -fstack-protector-strong -D_FORTIFY_SOURCE=2"
DEBUG_CFLAGS="$DEBUG_COMMON_FLAGS"
Expand Down Expand Up @@ -235,7 +235,7 @@ case "$AUTOBUILD_PLATFORM" in
# Incorporate special pre-processing flags
export CPPFLAGS="$TARGET_CPPFLAGS"
fi

# Force static linkage to libz by moving .sos out of the way
# (Libz is only packaging statics right now but keep this working.)
trap restore_sos EXIT
Expand All @@ -244,7 +244,7 @@ case "$AUTOBUILD_PLATFORM" in
mv -f "$solib" "$solib".disable
fi
done

mkdir -p "build_debug"
pushd "build_debug"
CFLAGS="$DEBUG_CFLAGS" \
Expand Down Expand Up @@ -281,7 +281,7 @@ case "$AUTOBUILD_PLATFORM" in
cp -a $PREFIX_RELEASE/lib/*.so* $stage/lib/release
cp -a $PREFIX_RELEASE/lib/libSDL2main.a $stage/lib/release
;;

*)
exit -1
;;
Expand Down