Skip to content

Commit

Permalink
LWJGL CI Configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Spasi committed Nov 8, 2023
1 parent c854997 commit e536d0f
Show file tree
Hide file tree
Showing 13 changed files with 279 additions and 62 deletions.
37 changes: 0 additions & 37 deletions .appveyor.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

update_version export-ignore

* -text

*.bat eol=crlf
*.sln eol=crlf
*.vcxproj eol=crlf
Expand Down
220 changes: 220 additions & 0 deletions .github/workflows/lwjgl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,220 @@
name: LWJGL Build

on:
push:
branches:
- master

env:
AWS_DEFAULT_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
S3_PARAMS: --cache-control "public,must-revalidate,proxy-revalidate,max-age=0"
OPUS_PARAMS: --disable-extra-programs --disable-doc --disable-hardening --disable-stack-protector --enable-custom-modes

jobs:
linux:
name: Linux
runs-on: ubuntu-latest
container:
image: centos:7
strategy:
fail-fast: false
matrix:
ARCH: [x64]
include:
- ARCH: x64
steps:
- name: Upgrade git
run: |
yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
yum -y install git
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 3
submodules: true
- name: Configure yum
run: |
yum -y install epel-release
yum -y update
- name: Install build dependencies
run: |
yum -y install centos-release-scl
yum -y install devtoolset-11-gcc-c++
yum -y install autoconf automake libtool awscli
- name: Configure ogg
run: |
source scl_source enable devtoolset-11 || true
cd ogg
./autogen.sh
./configure
- name: Configure build
run: |
source scl_source enable devtoolset-11 || true
./autogen.sh
./configure ${{env.OPUS_PARAMS}}
- name: Build
run: |
source scl_source enable devtoolset-11 || true
make
strip .libs/libopus.so
- name: Upload artifact
run: aws s3 cp .libs/libopus.so s3://lwjgl-build/nightly/linux/${{matrix.ARCH}}/ $S3_PARAMS
- name: Upload git revision
run: |
git config --global --add safe.directory $PWD
git log --first-parent --pretty=format:%H HEAD~2..HEAD~1 > libopus.so.git
aws s3 cp libopus.so.git s3://lwjgl-build/nightly/linux/${{matrix.ARCH}}/ $S3_PARAMS
linux-cross:
name: Linux Cross
runs-on: ubuntu-latest
container:
image: ${{matrix.CONTAINER}}
strategy:
fail-fast: false
matrix:
ARCH: [arm32, arm64, mips64, ppc64le, riscv64]
include:
# -----
- ARCH: arm32
CROSS_ARCH: armhf
CONTAINER: ubuntu:18.04
TRIPLET: arm-linux-gnueabihf
HOST: arm-unknown-linux-gnueabihf
# -----
- ARCH: arm64
CROSS_ARCH: arm64
CONTAINER: ubuntu:18.04
TRIPLET: aarch64-linux-gnu
HOST: aarch64-unknown-linux-gnu
# -----
- ARCH: mips64
CROSS_ARCH: mips64el
CONTAINER: ubuntu:18.04
TRIPLET: mips64el-linux-gnuabi64
HOST: mips64el-unknown-linux-gnu
# ----
- ARCH: ppc64le
CROSS_ARCH: ppc64el
CONTAINER: ubuntu:18.04
TRIPLET: powerpc64le-linux-gnu
HOST: powerpc64le-unknown-linux-gnu
# -----
- ARCH: riscv64
CROSS_ARCH: riscv64
CONTAINER: ubuntu:20.04
TRIPLET: riscv64-linux-gnu
HOST: riscv64-unknown-linux-gnu
steps:
- name: Upgrade git
run: |
apt-get -y update
apt-get -y install software-properties-common wget
apt-get -y install --reinstall ca-certificates
apt-get -y update
apt-get -y upgrade
wget https://apt.kitware.com/keys/kitware-archive-latest.asc
apt-key add kitware-archive-latest.asc
add-apt-repository -y 'deb https://apt.kitware.com/ubuntu/ bionic main'
add-apt-repository -y ppa:git-core/ppa
apt-get -y update
DEBIAN_FRONTEND=noninteractive apt-get -yq install awscli git
- uses: actions/checkout@v3
with:
fetch-depth: 3
submodules: true
- name: Install dependencies
run: DEBIAN_FRONTEND=noninteractive apt-get -yq install autoconf make libtool gcc-${{matrix.TRIPLET}} libc6-dev-${{matrix.CROSS_ARCH}}-cross
- name: Configure ogg
run: |
cd ogg
./autogen.sh
./configure --host=${{matrix.HOST}}
- name: Configure build
run: |
./autogen.sh
CC=${{matrix.TRIPLET}}-gcc ./configure ${{env.OPUS_PARAMS}} --host=${{matrix.HOST}}
- name: Build
run: |
make
${{matrix.TRIPLET}}-strip .libs/libopus.so
- name: Upload artifact
run: aws s3 cp .libs/libopus.so s3://lwjgl-build/nightly/linux/${{matrix.ARCH}}/ $S3_PARAMS
- name: Upload git revision
run: |
git config --global --add safe.directory $(pwd)
git log --first-parent --pretty=format:%H HEAD~2..HEAD~1 > libopus.so.git
aws s3 cp libopus.so.git s3://lwjgl-build/nightly/linux/${{matrix.ARCH}}/ $S3_PARAMS
macos:
name: macOS
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
ARCH: [x64, arm64]
include:
- ARCH: x64
CC: CFLAGS="-O2 -mmacosx-version-min=10.9" LDFLAGS=-mmacosx-version-min=10.9
HOST: x86_64
CMAKE_PARAMS: -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9
- ARCH: arm64
CC: SDKROOT=$(xcrun -sdk macosx11.1 --show-sdk-path) MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.1 --show-sdk-platform-version) CFLAGS="-O2 -target aarch64-apple-darwin -arch arm64 -mmacosx-version-min=11.0" LDFLAGS="-target aarch64-apple-darwin -arch arm64 -mmacosx-version-min=11.0"
HOST: aarch64
CMAKE_PARAMS: -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_TOOLCHAIN_FILE=../XCompile-lwjgl.cmake -DSYSTEM_NAME=Darwin -DSYSTEM_PROCESSOR=aarch64
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 3
submodules: true
- name: Install dependencies
run: brew install automake
- name: Configure build
run: |
./autogen.sh
${{matrix.CC}} ./configure ${{env.OPUS_PARAMS}} --target ${{matrix.ARCH}}-apple-darwin20 --host=${{matrix.HOST}}-apple-darwin20
- name: Build
run: |
${{matrix.CC}} make
strip -u -r .libs/libopus.dylib
- name: Upload artifact
run: aws s3 cp .libs/libopus.dylib s3://lwjgl-build/nightly/macosx/${{matrix.ARCH}}/ $S3_PARAMS
- name: Upload git revision
run: |
git log --first-parent --pretty=format:%H HEAD~2..HEAD~1 > libopus.dylib.git
aws s3 cp libopus.dylib.git s3://lwjgl-build/nightly/macosx/${{matrix.ARCH}}/ $S3_PARAMS
windows:
name: Windows
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
ARCH: [x86, x64, arm64]
include:
- ARCH: x86
PLATFORM: Win32
- ARCH: x64
PLATFORM: x64
- ARCH: arm64
PLATFORM: ARM64
defaults:
run:
shell: cmd
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 3
submodules: true
- name: Configure build
run: cmake -B build -G "Visual Studio 17 2022" -A ${{matrix.PLATFORM}} -DOPUS_INSTALL_PKG_CONFIG_MODULE=OFF -DOPUS_INSTALL_CMAKE_CONFIG_MODULE=OFF -DOPUS_HARDENING=OFF -DOPUS_STACK_PROTECTOR=OFF -DOPUS_BUILD_SHARED_LIBRARY=ON -DOPUS_CUSTOM_MODES=ON
- name: Build
run: cmake --build build --parallel --config Release
- name: Upload artifact
run: aws s3 cp build\Release\opus.dll s3://lwjgl-build/nightly/windows/${{matrix.ARCH}}/ ${{env.S3_PARAMS}}
- name: Upload git revision
run: |
git log --first-parent --pretty=format:%%H HEAD~2..HEAD~1 > opus.dll.git
aws s3 cp opus.dll.git s3://lwjgl-build/nightly/windows/${{matrix.ARCH}}/ ${{env.S3_PARAMS}}
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[submodule "opusfile"]
path = opusfile
url = ../../xiph/opusfile.git
[submodule "ogg"]
path = ogg
url = ../../xiph/ogg.git
[submodule "libopusenc"]
path = libopusenc
url = ../../xiph/libopusenc.git
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,9 @@ set_target_properties(opus
target_include_directories(
opus
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/libopusenc/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/ogg/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/opusfile/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/opus>
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
Expand All @@ -279,6 +282,12 @@ target_include_directories(

target_link_libraries(opus PRIVATE ${OPUS_REQUIRED_LIBRARIES})
target_compile_definitions(opus PRIVATE OPUS_BUILD)
target_compile_definitions(opus PRIVATE OUTSIDE_SPEEX)
target_compile_definitions(opus PRIVATE RANDOM_PREFIX=lwjgl)
target_compile_definitions(opus PRIVATE RESAMPLE_FULL_SINC_TABLE=1)
target_compile_definitions(opus PRIVATE OPE_BUILD)
target_compile_definitions(opus PRIVATE PACKAGE_NAME="opus")
target_compile_definitions(opus PRIVATE PACKAGE_VERSION="${PACKAGE_VERSION}")

if(OPUS_FIXED_POINT_DEBUG)
target_compile_definitions(opus PRIVATE FIXED_DEBUG)
Expand Down
6 changes: 5 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ lib_LTLIBRARIES = libopus.la
DIST_SUBDIRS = doc

AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/celt -I$(top_srcdir)/silk \
-I$(top_srcdir)/silk/float -I$(top_srcdir)/silk/fixed $(NE10_CFLAGS)
-I$(top_srcdir)/silk/float -I$(top_srcdir)/silk/fixed $(NE10_CFLAGS) \
-I$(top_srcdir)/libopusenc/include \
-I$(top_srcdir)/ogg/include \
-I$(top_srcdir)/opusfile/include \
-DOUTSIDE_SPEEX -DRANDOM_PREFIX=lwjgl -DRESAMPLE_FULL_SINC_TABLE=1 -DOPE_BUILD

include celt_sources.mk
include silk_sources.mk
Expand Down
2 changes: 1 addition & 1 deletion Makefile.unix
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ldflags-from-ldlibdirs = $(addprefix -L,$(1))
ldlibs-from-libs = $(addprefix -l,$(1))

WARNINGS = -Wall -W -Wstrict-prototypes -Wextra -Wcast-align -Wnested-externs -Wshadow
CFLAGS += -O2 -g $(WARNINGS) -DOPUS_BUILD
CFLAGS += -O2 $(WARNINGS) -DOPUS_BUILD
CINCLUDES = include silk celt

ifdef FIXED_POINT
Expand Down
1 change: 1 addition & 0 deletions libopusenc
Submodule libopusenc added at f51c3a
1 change: 1 addition & 0 deletions ogg
Submodule ogg added at 3069cc
16 changes: 15 additions & 1 deletion opus_headers.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,18 @@ src/opus_private.h \
src/analysis.h \
src/mapping_matrix.h \
src/mlp.h \
src/tansig_table.h
src/tansig_table.h \
libopusenc/include/opusenc.h \
libopusenc/src/arch.h \
libopusenc/src/ogg_packer.h \
libopusenc/src/opus_header.h \
libopusenc/src/picture.h \
libopusenc/src/resample_sse.h \
libopusenc/src/speex_resampler.h \
libopusenc/src/unicode_support.h \
ogg/include/ogg/ogg.h \
ogg/include/ogg/os_types.h \
ogg/src/crctable.h \
opusfile/include/opusfile.h \
opusfile/src/internal.h \
opusfile/src/winerrno.h
16 changes: 15 additions & 1 deletion opus_sources.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,21 @@ src/opus_multistream_decoder.c \
src/repacketizer.c \
src/opus_projection_encoder.c \
src/opus_projection_decoder.c \
src/mapping_matrix.c
src/mapping_matrix.c \
libopusenc/src/ogg_packer.c \
libopusenc/src/opus_header.c \
libopusenc/src/opusenc.c \
libopusenc/src/picture.c \
libopusenc/src/resample.c \
libopusenc/src/unicode_support.c \
ogg/src/bitwise.c \
ogg/src/framing.c \
opusfile/src/http.c \
opusfile/src/info.c \
opusfile/src/internal.c \
opusfile/src/opusfile.c \
opusfile/src/stream.c \
opusfile/src/wincerts.c

OPUS_SOURCES_FLOAT = \
src/analysis.c \
Expand Down
1 change: 1 addition & 0 deletions opusfile
Submodule opusfile added at c429fe

0 comments on commit e536d0f

Please sign in to comment.