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

Turn ASSIMP_BUILD_DRACO On #4

Closed
wants to merge 2 commits into from
Closed
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
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* -text

# Declare files that will always have LF line endings on checkout.
*.cpp text eol=lf
*.h text eol=lf
Expand Down
129 changes: 0 additions & 129 deletions .github/workflows/ccpp.yml

This file was deleted.

166 changes: 166 additions & 0 deletions .github/workflows/lwjgl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
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"

jobs:
linux:
name: Linux
runs-on: ${{matrix.runner}}
strategy:
fail-fast: false
matrix:
ARCH: [x64, arm32, arm64]
include:
# -----
- ARCH: x64
runner: ubuntu-18.04
PACKAGES:
CC:
STRIP: strip
# -----
- ARCH: arm32
runner: ubuntu-18.04
CROSS_ARCH: armhf
PACKAGES: gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf libc6-dev-armhf-cross
CROSS_PACKAGES: zlib1g-dev:armhf libc6-dev:armhf
CC: CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++
STRIP: arm-linux-gnueabihf-strip
# -----
- ARCH: arm64
runner: ubuntu-18.04
CROSS_ARCH: arm64
PACKAGES: gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libc6-dev-arm64-cross
CROSS_PACKAGES: zlib1g-dev:arm64 libc6-dev:arm64
CC: CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++
STRIP: aarch64-linux-gnu-strip
# -----
# - ARCH: mips64
# runner: ubuntu-18.04
# CROSS_ARCH: mips64el
# PACKAGES: gcc-mips64el-linux-gnuabi64 g++-mips64el-linux-gnuabi64 libc6-dev-mips64el-cross
# CROSS_PACKAGES: zlib1g-dev:mips64el
# CC: CC=mips64el-linux-gnuabi64-gcc CXX=mips64el-linux-gnuabi64-g++
# CMAKE_PARAMS:
# STRIP: mips64el-linux-gnuabi64-strip
env:
LWJGL_ARCH: ${{matrix.ARCH}}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 3
- run: |
sudo apt-get update
sudo apt-get -yq install ${{matrix.PACKAGES}}
name: Install dependencies
- run: |
if [[ "${{matrix.ARCH}}" != "mips64" ]]
then
sudo sed -i 's/deb http/deb [arch=amd64,i386] http/' /etc/apt/sources.list
sudo grep "ubuntu.com/ubuntu" /etc/apt/sources.list | sudo tee /etc/apt/sources.list.d/ports.list
sudo sed -i 's/amd64,i386/armhf,arm64/' /etc/apt/sources.list.d/ports.list
sudo sed -i 's#http://.*/ubuntu#http://ports.ubuntu.com/ubuntu-ports#' /etc/apt/sources.list.d/ports.list
else
sudo rm -rf /etc/apt/sources.list
sudo sh -c "echo 'deb http://deb.debian.org/debian stretch main' >> /etc/apt/sources.list"
fi
sudo dpkg --add-architecture ${{matrix.CROSS_ARCH}}
sudo apt-get update || true
if: contains(matrix.ARCH, 'x64') != true
name: Prepare cross-compilation
- run: sudo apt-get -yq --allow-unauthenticated --no-install-suggests --no-install-recommends install ${{matrix.CROSS_PACKAGES}} -o Dpkg::Options::="--force-overwrite"
if: contains(matrix.ARCH, 'x64') != true
name: Install cross-compilation dependencies
- run: |
mkdir build
cd build
${{matrix.CC}} cmake -DASSIMP_BUILD_ASSIMP_TOOLS=OFF -ASSIMP_BUILD_DRACO=ON -DASSIMP_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0" ..
name: Configure build
- run: |
cd build
cmake --build .
${{matrix.STRIP}} bin/libassimp.so
name: Build
- run: aws s3 cp build/bin/libassimp.so s3://lwjgl-build/nightly/linux/${{matrix.ARCH}}/ $S3_PARAMS
name: Upload artifact
- run: |
git log --first-parent --pretty=format:%H HEAD~2..HEAD~1 > libassimp.so.git
aws s3 cp libassimp.so.git s3://lwjgl-build/nightly/linux/${{matrix.ARCH}}/ $S3_PARAMS
name: Upload git revision

macos:
name: macOS
runs-on: macos-latest
strategy:
matrix:
ARCH: [x64, arm64]
include:
- ARCH: x64
CMAKE_PARAMS: -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9
- ARCH: arm64
CMAKE_PARAMS: -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DCMAKE_OSX_ARCHITECTURES=arm64
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 3
- run: |
mkdir build
cd build
cmake -DASSIMP_BUILD_ASSIMP_TOOLS=OFF -ASSIMP_BUILD_DRACO=ON -DASSIMP_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release ${{matrix.CMAKE_PARAMS}} ..
name: Configure build
- run: |
cd build
cmake --build .
strip -u -r bin/libassimp.dylib
name: Build
- run: aws s3 cp build/bin/libassimp.dylib s3://lwjgl-build/nightly/macosx/${{matrix.ARCH}}/ $S3_PARAMS
name: Upload artifact
- run: |
git log --first-parent --pretty=format:%H HEAD~2..HEAD~1 > libassimp.dylib.git
aws s3 cp libassimp.dylib.git s3://lwjgl-build/nightly/macosx/${{matrix.ARCH}}/ $S3_PARAMS
name: Upload git revision

windows:
name: Windows
runs-on: windows-latest
strategy:
matrix:
ARCH: [x86, x64, arm64]
include:
- ARCH: x86
PLATFORM: Win32
- ARCH: x64
PLATFORM: x64
- ARCH: arm64
PLATFORM: ARM64
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 3
- run: |
mkdir build
cd build
cmake -G "Visual Studio 17 2022" -A ${{matrix.PLATFORM}} -DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_BUILD_TESTS=OFF -DCMAKE_C_FLAGS_RELEASE="/MT /EHsc /Ox /GF /Gy /GL /GS- /DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="/MT /EHsc /Ox /GF /Gy /GL /GS- /DNDEBUG" -DCMAKE_SHARED_LINKER_FLAGS_RELEASE="/OPT:REF,ICF /LTCG /INCREMENTAL:NO" ..
shell: cmd
name: Configure build
- run: |
cd build
cmake --build . --config Release
shell: cmd
name: Build
- run: aws s3 cp build\bin\Release\assimp-vc143-mt.dll s3://lwjgl-build/nightly/windows/${{matrix.ARCH}}/assimp.dll ${{env.S3_PARAMS}}
shell: cmd
name: Upload artifact
- run: |
git log --first-parent --pretty=format:%%H HEAD~2..HEAD~1 > assimp.dll.git
aws s3 cp assimp.dll.git s3://lwjgl-build/nightly/windows/${{matrix.ARCH}}/ ${{env.S3_PARAMS}}
shell: cmd
name: Upload git revision
56 changes: 0 additions & 56 deletions .github/workflows/sanitizer.yml

This file was deleted.

4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,9 @@ IF ((CMAKE_C_COMPILER_ID MATCHES "GNU") AND NOT MINGW)
ELSEIF(MSVC)
# enable multi-core compilation with MSVC
IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) # clang-cl
ADD_COMPILE_OPTIONS(/bigobj /W4 /WX )
ADD_COMPILE_OPTIONS(/bigobj /W4)
ELSE() # msvc
ADD_COMPILE_OPTIONS(/MP /bigobj /W4 /WX)
ADD_COMPILE_OPTIONS(/MP /bigobj /W4)
ENDIF()
# disable "elements of array '' will be default initialized" warning on MSVC2013
IF(MSVC12)
Expand Down
16 changes: 8 additions & 8 deletions code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1179,14 +1179,14 @@ ADD_LIBRARY(assimp::assimp ALIAS assimp)

TARGET_USE_COMMON_OUTPUT_DIRECTORY(assimp)

IF (ASSIMP_WARNINGS_AS_ERRORS)
MESSAGE(STATUS "Treating all warnings as errors (for assimp library only)")
IF (MSVC)
TARGET_COMPILE_OPTIONS(assimp PRIVATE /W4 /WX)
ELSE()
TARGET_COMPILE_OPTIONS(assimp PRIVATE -Wall -Werror)
ENDIF()
ENDIF()
#IF (ASSIMP_WARNINGS_AS_ERRORS)
# MESSAGE(STATUS "Treating all warnings as errors (for assimp library only)")
# IF (MSVC)
# TARGET_COMPILE_OPTIONS(assimp PRIVATE /W4 /WX)
# ELSE()
# TARGET_COMPILE_OPTIONS(assimp PRIVATE -Wall -Werror)
# ENDIF()
#ENDIF()

# adds C_FLAGS required to compile zip.c on old GCC 4.x compiler
TARGET_COMPILE_FEATURES(assimp PRIVATE c_std_99)
Expand Down
Loading