|
| 1 | +name: Build DirectXTex Libraries (Debug) |
| 2 | + |
| 3 | +on: [workflow_dispatch] |
| 4 | + |
| 5 | +jobs: |
| 6 | + build: |
| 7 | + runs-on: ${{ matrix.os }} |
| 8 | + strategy: |
| 9 | + matrix: |
| 10 | + include: |
| 11 | + - os: ubuntu-latest |
| 12 | + arch: x86_64 |
| 13 | + cmake-arch: x64 |
| 14 | + vcpkg-triplet: x64-linux |
| 15 | +# - os: ubuntu-latest |
| 16 | +# arch: arm64 |
| 17 | +# cmake-arch: aarch64 |
| 18 | +# vcpkg-triplet: arm64-linux |
| 19 | +# - os: windows-latest |
| 20 | +# arch: x86_64 |
| 21 | +# cmake-arch: x64 |
| 22 | +# vcpkg-triplet: x64-windows-static |
| 23 | +# - os: windows-latest |
| 24 | +# arch: x86 |
| 25 | +# cmake-arch: win32 |
| 26 | +# vcpkg-triplet: x86-windows-static |
| 27 | +# - os: windows-latest |
| 28 | +# arch: arm64 |
| 29 | +# cmake-arch: arm64 |
| 30 | +# vcpkg-triplet: arm64-windows-static |
| 31 | +# - os: macos-latest |
| 32 | +# arch: x86_64 |
| 33 | +# cmake-arch: x86_64 |
| 34 | +# vcpkg-triplet: x64-osx |
| 35 | +# - os: macos-latest |
| 36 | +# arch: arm64 |
| 37 | +# cmake-arch: arm64 |
| 38 | +# vcpkg-triplet: arm64-osx |
| 39 | + steps: |
| 40 | + |
| 41 | + with: |
| 42 | + repository: 'HexaEngine/Hexa.NET.DirectXTex' |
| 43 | + path: 'DirectXTex' |
| 44 | + submodules: true |
| 45 | + |
| 46 | + - name: Install dependencies on Ubuntu |
| 47 | + if: matrix.os == 'ubuntu-latest' |
| 48 | + run: | |
| 49 | + sudo apt-get update |
| 50 | + sudo apt-get install -y build-essential cmake |
| 51 | +
|
| 52 | + - name: Install Cross-Compilation Tools for ARM64 |
| 53 | + if: matrix.os == 'ubuntu-latest' && matrix.arch == 'arm64' |
| 54 | + run: | |
| 55 | + sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu |
| 56 | + |
| 57 | + - name: Install vcpkg (Other) |
| 58 | + if: matrix.os != 'windows-latest' |
| 59 | + run: | |
| 60 | + cd DirectXTex |
| 61 | + git clone https://github.com/microsoft/vcpkg.git |
| 62 | + ./vcpkg/bootstrap-vcpkg.sh |
| 63 | + ./vcpkg/vcpkg install directx-headers --allow-unsupported --triplet ${{ matrix.vcpkg-triplet }} |
| 64 | + ./vcpkg/vcpkg install directxmath --allow-unsupported --triplet ${{ matrix.vcpkg-triplet }} |
| 65 | + ./vcpkg/vcpkg install libpng --triplet ${{ matrix.vcpkg-triplet }} |
| 66 | + ./vcpkg/vcpkg install libjpeg-turbo --triplet ${{ matrix.vcpkg-triplet }} |
| 67 | + ./vcpkg/vcpkg install openexr --triplet ${{ matrix.vcpkg-triplet }} |
| 68 | +
|
| 69 | + - name: Install vcpkg (Windows) |
| 70 | + if: matrix.os == 'windows-latest' |
| 71 | + run: | |
| 72 | + cd DirectXTex |
| 73 | + git clone https://github.com/microsoft/vcpkg.git |
| 74 | + ./vcpkg/bootstrap-vcpkg.bat |
| 75 | + ./vcpkg/vcpkg.exe install directx-headers --allow-unsupported --triplet ${{ matrix.vcpkg-triplet }} |
| 76 | + ./vcpkg/vcpkg.exe install directxmath --allow-unsupported --triplet ${{ matrix.vcpkg-triplet }} |
| 77 | + ./vcpkg/vcpkg.exe install libpng --triplet ${{ matrix.vcpkg-triplet }} |
| 78 | + ./vcpkg/vcpkg.exe install libjpeg-turbo --triplet ${{ matrix.vcpkg-triplet }} |
| 79 | + ./vcpkg/vcpkg.exe install openexr --triplet ${{ matrix.vcpkg-triplet }} |
| 80 | +
|
| 81 | + - name: Configure cimgui with CMake for ARM64 on Linux |
| 82 | + if: matrix.os == 'ubuntu-latest' && matrix.arch == 'arm64' |
| 83 | + run: | |
| 84 | + cd DirectXTex |
| 85 | + cmake -S ./ -B ./build -DCMAKE_SYSTEM_PROCESSOR=aarch64 -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DCMAKE_TOOLCHAIN_FILE="./vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=${{ matrix.vcpkg-triplet }} -DENABLE_DX12=OFF -DENABLE_DX11=OFF |
| 86 | +
|
| 87 | + - name: Configure cimgui with CMake on Linux (x86_64) |
| 88 | + if: matrix.os == 'ubuntu-latest' && matrix.arch == 'x86_64' |
| 89 | + run: | |
| 90 | + cd DirectXTex |
| 91 | + cmake -S ./ -B ./build -DCMAKE_TOOLCHAIN_FILE="./vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=${{ matrix.vcpkg-triplet }} -DENABLE_DX12=OFF -DENABLE_DX11=OFF |
| 92 | +
|
| 93 | + - name: Configure cimgui with CMake for macOS |
| 94 | + if: matrix.os == 'macos-latest' |
| 95 | + run: | |
| 96 | + cd DirectXTex |
| 97 | + cmake -S ./ -B ./build -DCMAKE_OSX_ARCHITECTURES=${{ matrix.cmake-arch }} -DCMAKE_TOOLCHAIN_FILE="./vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=${{ matrix.vcpkg-triplet }} -DENABLE_DX12=OFF -DENABLE_DX11=OFF |
| 98 | +
|
| 99 | + - name: Configure cimgui with CMake for Windows |
| 100 | + if: matrix.os == 'windows-latest' |
| 101 | + run: | |
| 102 | + cd DirectXTex |
| 103 | + cmake -S ./ -B ./build -A ${{ matrix.cmake-arch }} -DCMAKE_TOOLCHAIN_FILE="./vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=${{ matrix.vcpkg-triplet }} |
| 104 | +
|
| 105 | + - name: Build DirectXTex |
| 106 | + run: cmake --build DirectXTex/build --config Debug |
| 107 | + |
| 108 | + - name: Upload Artifacts |
| 109 | + |
| 110 | + with: |
| 111 | + name: DirectXTex-${{ matrix.os }}-${{ matrix.arch }}-artifacts |
| 112 | + path: | |
| 113 | + DirectXTex/build/bin/Release/*.dll |
| 114 | + DirectXTex/build/lib/*.so |
| 115 | + DirectXTex/build/lib/*.dylib |
| 116 | + DirectXTex/build/bin/CMake/*.dylib |
| 117 | + if-no-files-found: ignore # 'warn' or 'ignore' or 'error' |
0 commit comments