From 458d6ba11fb161030c37a37ede9b72495595485d Mon Sep 17 00:00:00 2001 From: Dave Corley <73663882+magicaldave@users.noreply.github.com> Date: Tue, 17 Oct 2023 21:35:11 -0500 Subject: [PATCH] Feat(CI): Add prelim CI build (#2) * Feat(CI): Add prelim CI build --- .github/workflows/crabnet.yml | 62 +++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/crabnet.yml diff --git a/.github/workflows/crabnet.yml b/.github/workflows/crabnet.yml new file mode 100644 index 000000000..ed0585817 --- /dev/null +++ b/.github/workflows/crabnet.yml @@ -0,0 +1,62 @@ +name: Crab-Main + +on: + workflow_dispatch: + push: + branches: + - 'master' + pull_request: + branches: [ master ] + + +jobs: + Evolve-To-Crab: + strategy: + matrix: + build_type: [Release, RelWithDebInfo, MinSizeRel, Debug] + target_system: [ ubuntu-22.04, windows-2022 ] + runs-on: ${{ matrix.target_system }} + env: + BUILD_EXT: ${{ matrix.target_system == 'windows-2022' && '.lib' || '.a' }} + BUILD_PREFIX: ${{ matrix.target_system == 'ubuntu-22.04' && 'lib' || ''}} + BUILD_SUFFIX: ${{ matrix.target_system == 'windows-2022' && matrix.build_type == 'Debug' && 'd' || '' }} + BUILD_DIR: D:/a/CrabNet/CrabNet/lib/${{ matrix.build_type}}/ + # LIB_NAME: + + steps: + - uses: actions/checkout@v4 + + - name: Configure + shell: bash + run: cmake . + + - name: Build + run: | + cmake --build . --config ${{ matrix.build_type }} + + - name: Make Archive + if: github.event_name != 'pull_request' + run: | + 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on CrabNet-${{ runner.os }}-${{ matrix.build_type }}.7z LICENSE include/ ${{ runner.os == 'Windows' && env.BUILD_DIR || 'lib/' }}${{ env.BUILD_PREFIX }}RakNetLibStatic${{ env.BUILD_SUFFIX }}${{ env.BUILD_EXT }} + # env: + # LIB_NAME: $BUILD_PREFIXRakNetLibStatic$BUILD_SUFFIX$BUILD_EXT + + + - name: Upload Release + if: github.event_name != 'pull_request' + uses: softprops/action-gh-release@v1 + with: + tag_name: Stable-CI + files: CrabNet-${{ runner.os }}-${{ matrix.build_type }}.7z + body: | + CI Build for Dreamweave CrabNet Fork + + - name: Upload Artifact + if: github.event_name == 'pull_request' + uses: actions/upload-artifact@v3 + with: + path: | + ${{ runner.os == 'Windows' && env.BUILD_DIR || 'lib/' }}${{ env.BUILD_PREFIX }}RakNetLibStatic${{ env.BUILD_SUFFIX }}${{ env.BUILD_EXT }} + include/ + LICENSE + name: CrabNet-${{ runner.os }}-${{ matrix.build_type }}