|
| 1 | +name: CMake Linux Cross-Compile |
| 2 | + |
| 3 | +on: |
| 4 | + push: # Keep empty to run on each branch when push the code. Otherwise use branches: [ master ] |
| 5 | + branches: [ main ] |
| 6 | + pull_request: # Set to master to run only when merge with master branch |
| 7 | + branches: [ main ] |
| 8 | + |
| 9 | +env: |
| 10 | + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) |
| 11 | + BUILD_TYPE: Release |
| 12 | + |
| 13 | +# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Linux. |
| 14 | +# You can convert this to a matrix build if you need cross-platform coverage. |
| 15 | +# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix |
| 16 | + |
| 17 | +jobs: |
| 18 | + |
| 19 | + job_linux: |
| 20 | + name: Linux Platform, x86_64, x86, arm, aarch64 builds |
| 21 | + runs-on: ubuntu-latest |
| 22 | + steps: |
| 23 | + - name: Linux - Checkout AREG SDK Demo project sources and dependencies |
| 24 | + uses: actions/checkout@v4 |
| 25 | + |
| 26 | + - name: Linux - Setup Java JDK on Windows to run code generator |
| 27 | + |
| 28 | + with: |
| 29 | + java-version: 17 |
| 30 | + java-package: jre |
| 31 | + distribution: temurin |
| 32 | + |
| 33 | + - name: Update compilers on Linux |
| 34 | + # Update compilers, set C/C++ compilers |
| 35 | + run: sudo apt-get update |
| 36 | + |
| 37 | + - name: Linux - Configure Demo, include AREG SDK after project(), GNU on x64, shared |
| 38 | + working-directory: ${{github.workspace}} |
| 39 | + run: cmake -B ./product/cache/gnu-x64-so -DAREG_COMPILER_FAMILY=gnu |
| 40 | + |
| 41 | + - name: Linux - Build Demo, include AREG SDK after project(), GNU on x64, shared |
| 42 | + working-directory: ${{github.workspace}} |
| 43 | + run: cmake --build ./product/cache/gnu-x64-so -j20 |
| 44 | + |
| 45 | + - name: Linux - Install multilib |
| 46 | + run: sudo apt-get install -y gcc-multilib g++-multilib |
| 47 | + |
| 48 | + - name: Linux - Configure Demo, include AREG SDK after project(), GNU on x86, shared |
| 49 | + working-directory: ${{github.workspace}} |
| 50 | + run: cmake -B ./product/cache/gnu-x86-so -DAREG_COMPILER_FAMILY=gnu -DAREG_PROCESSOR=x86 |
| 51 | + |
| 52 | + - name: Linux - Build Demo, include AREG SDK after project(), GNU on x86, shared |
| 53 | + working-directory: ${{github.workspace}} |
| 54 | + run: cmake --build ./product/cache/gnu-x86-so -j20 |
| 55 | + |
| 56 | + - name: Linux - Install GNU 32-bit ARM compilers |
| 57 | + run: sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf |
| 58 | + |
| 59 | + - name: Linux - Configure Demo, include AREG SDK after project(), GNU on arm32, shared |
| 60 | + working-directory: ${{github.workspace}} |
| 61 | + run: cmake -B ./product/cache/gnu-arm-so -DAREG_COMPILER_FAMILY=gnu -DAREG_PROCESSOR=arm |
| 62 | + |
| 63 | + - name: Linux - Build Demo, include AREG SDK after project(), GNU on arm32, shared |
| 64 | + working-directory: ${{github.workspace}} |
| 65 | + run: cmake --build ./product/cache/gnu-arm-so -j20 |
| 66 | + |
| 67 | + - name: Linux - Install GNU 64-bit AARCH64 compilers |
| 68 | + run: sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu |
| 69 | + |
| 70 | + - name: Linux - Configure Demo, include AREG SDK after project(), GNU on aarch64, shared |
| 71 | + working-directory: ${{github.workspace}} |
| 72 | + run: cmake -B ./product/cache/gnu-aarch64-so -DAREG_COMPILER_FAMILY=gnu -DAREG_PROCESSOR=aarch64 |
| 73 | + |
| 74 | + - name: Linux - Build Demo, include AREG SDK after project(), GNU on aarch64, shared |
| 75 | + working-directory: ${{github.workspace}} |
| 76 | + run: cmake --build ./product/cache/gnu-aarch64-so -j20 |
| 77 | + |
| 78 | + - name: Linux - Cross-compile configure, gnu-linux-arm32.cmake |
| 79 | + working-directory: ${{github.workspace}} |
| 80 | + run: cmake -B ./product/cache/gnu-linux-arm32 -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchains/gnu-linux-arm32.cmake -DAREG_EXTENDED:BOOL=ON |
| 81 | + |
| 82 | + - name: Linux - Cross-compile build, gnu-linux-arm32.cmake |
| 83 | + working-directory: ${{github.workspace}} |
| 84 | + run: cmake --build ./product/cache/gnu-linux-arm32 -j20 |
| 85 | + |
| 86 | + - name: Linux - Cross-compile configure, gnu-linux-arm64.cmake |
| 87 | + working-directory: ${{github.workspace}} |
| 88 | + run: cmake -B ./product/cache/gnu-linux-arm64 -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchains/gnu-linux-arm64.cmake -DAREG_EXTENDED:BOOL=ON |
| 89 | + |
| 90 | + - name: Linux - Cross-compile build, gnu-linux-arm64.cmake |
| 91 | + working-directory: ${{github.workspace}} |
| 92 | + run: cmake --build ./product/cache/gnu-linux-arm64 -j20 |
| 93 | + |
| 94 | + - name: Linux - Cross-compile configure, gnu-linux-x64.cmake |
| 95 | + working-directory: ${{github.workspace}} |
| 96 | + run: cmake -B ./product/cache/gnu-linux-x64 -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchains/gnu-linux-x64.cmake -DAREG_EXTENDED:BOOL=ON |
| 97 | + |
| 98 | + - name: Linux - Cross-compile build, gnu-linux-x64.cmake |
| 99 | + working-directory: ${{github.workspace}} |
| 100 | + run: cmake --build ./product/cache/gnu-linux-x64 -j20 |
| 101 | + |
| 102 | + - name: Linux - Cross-compile configure, gnu-linux-x86.cmake |
| 103 | + working-directory: ${{github.workspace}} |
| 104 | + run: cmake -B ./product/cache/gnu-linux-x86 -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchains/gnu-linux-x86.cmake -DAREG_EXTENDED:BOOL=ON |
| 105 | + |
| 106 | + - name: Linux - Cross-compile build, gnu-linux-x86.cmake |
| 107 | + working-directory: ${{github.workspace}} |
| 108 | + run: cmake --build ./product/cache/gnu-linux-x86 -j20 |
| 109 | + |
| 110 | + - name: Linux - Cross-compile configure, clang-linux-arm32.cmake |
| 111 | + working-directory: ${{github.workspace}} |
| 112 | + run: cmake -B ./product/cache/clang-linux-arm32 -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchains/clang-linux-arm32.cmake -DAREG_EXTENDED:BOOL=ON |
| 113 | + |
| 114 | + - name: Linux - Cross-compile build, clang-linux-arm32.cmake |
| 115 | + working-directory: ${{github.workspace}} |
| 116 | + run: cmake --build ./product/cache/clang-linux-arm32 -j20 |
| 117 | + |
| 118 | + - name: Linux - Cross-compile configure, clang-linux-arm64.cmake |
| 119 | + working-directory: ${{github.workspace}} |
| 120 | + run: cmake -B ./product/cache/clang-linux-arm64 -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchains/clang-linux-arm64.cmake -DAREG_EXTENDED:BOOL=ON |
| 121 | + |
| 122 | + - name: Linux - Cross-compile build, clang-linux-arm64.cmake |
| 123 | + working-directory: ${{github.workspace}} |
| 124 | + run: cmake --build ./product/cache/clang-linux-arm64 -j20 |
| 125 | + |
| 126 | + - name: Linux - Cross-compile configure, clang-linux-x64.cmake |
| 127 | + working-directory: ${{github.workspace}} |
| 128 | + run: cmake -B ./product/cache/clang-linux-x64 -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchains/clang-linux-x64.cmake -DAREG_EXTENDED:BOOL=ON |
| 129 | + |
| 130 | + - name: Linux - Cross-compile build, clang-linux-x64.cmake |
| 131 | + working-directory: ${{github.workspace}} |
| 132 | + run: cmake --build ./product/cache/clang-linux-x64 -j20 |
| 133 | + |
| 134 | + - name: Linux - Cross-compile configure, clang-linux-x86.cmake |
| 135 | + working-directory: ${{github.workspace}} |
| 136 | + run: cmake -B ./product/cache/clang-linux-x86 -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchains/clang-linux-x86.cmake -DAREG_EXTENDED:BOOL=ON |
| 137 | + |
| 138 | + - name: Linux - Cross-compile build, clang-linux-x86.cmake |
| 139 | + working-directory: ${{github.workspace}} |
| 140 | + run: cmake --build ./product/cache/clang-linux-x86 -j20 |
0 commit comments