diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-01-07 10:17:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-07 10:17:15 +0100 |
| commit | 667dc36962dbe86e2bb34715af5bb59ea1310e8e (patch) | |
| tree | 77e7a3c57bda249e0a28fc2325bfe8240a3117f5 /.github/workflows/manual.yml | |
| parent | e249a33d3e038f0e3c17f2f6c3eb5b8d7a21a2c3 (diff) | |
| parent | f5d06338c73429f945881cf4e89920c5f2ca56c2 (diff) | |
| download | box64-667dc36962dbe86e2bb34715af5bb59ea1310e8e.tar.gz box64-667dc36962dbe86e2bb34715af5bb59ea1310e8e.zip | |
Merge pull request #204 from Seas0/main
Sync configuration from box86
Diffstat (limited to '.github/workflows/manual.yml')
| -rw-r--r-- | .github/workflows/manual.yml | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml new file mode 100644 index 00000000..baba3877 --- /dev/null +++ b/.github/workflows/manual.yml @@ -0,0 +1,95 @@ +### Manual build Box64 with Github Action +name: Custom build Box64 + +on: + workflow_dispatch: + inputs: + platform: + description: 'Target platform name' + required: true + default: 'GENERIC_ARM' + type: choice + options: + - X64 + - GENERIC_ARM + - PHYTIUM + - RK3288 + - RK3326 + - RK3399 + - RPI4ARM64 + - SD845 + - TEGRAX1 + build_type: + description: 'Build type' + required: true + default: 'RelWithDebInfo' + type: choice + options: + - RelWithDebInfo + - Release + - Debug + - MinSizeRel + dynarec: + description: 'Enable dynarec' + required: false + default: 'true' + type: boolean + trace: + description: 'Enable trace' + required: false + default: 'false' + type: boolean + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: "Checkout Box64 Repository" + uses: actions/checkout@v2 + + - name: "Environment preparation" + run: | + sudo apt-get update + if [[ ${{ github.event.inputs.platform }} != 'X64' && ${{ github.event.inputs.platform }} != 'GENERIC_ARM' ]]; then + echo "BOX64_PLATFORM_MARCRO=-D${{ github.event.inputs.platform }}=1" >> $GITHUB_ENV + echo "BOX64_COMPILER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV + sudo apt-get -y install git gcc-aarch64-linux-gnu cmake make python3 + else + if [[ ${{ github.event.inputs.platform }} == 'X64' ]]; then + echo "BOX64_PLATFORM_MARCRO=-DLD80BITS=1 -DNOALIGN=1" >> $GITHUB_ENV + echo "BOX64_COMPILER=gcc" >> $GITHUB_ENV + sudo apt-get -y install git cmake make python3 + else + echo BOX64_PLATFORM_MARCRO="-DARM_DYNAREC=ON" >> $GITHUB_ENV + echo "BOX64_COMPILER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV + sudo apt-get -y install git gcc-aarch64-linux-gnu cmake make python3 + fi + fi + + - name: "Display Build info" + run: | + echo "CMake Platform Macro: ${{ env.BOX64_PLATFORM_MARCRO }}" + echo "CMake C Compiler: ${{ env.BOX64_COMPILER }}" + echo "Build type: ${{ github.event.inputs.build_type }}" + echo "Dynarec Enabled: ${{ github.event.inputs.dynarec }}" + echo "Trace Enabled: ${{ github.event.inputs.trace }}" + + - name: "Build Box64" + run: | + mkdir build + cd build + cmake .. -DCMAKE_C_COMPILER=${{ env.BOX64_COMPILER }} ${{ env.BOX64_PLATFORM_MARCRO }}\ + -DCMAKE_BUILD_TYPE=${{ github.event.inputs.build_type }}\ + -DARM_DYNAREC:BOOL=${{ github.event.inputs.dynarec }}\ + -DHAVE_TRACE:BOOL=${{ github.event.inputs.trace }}\ + -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON + make -j$(nproc) VERBOSE=1 + + - name: "Upload Artifact" + uses: actions/upload-artifact@v2 + with: + name: box64-${{ github.event.inputs.platform }}-${{ github.event.inputs.build_type }} + path: build/box64 + + + |