Skip to content

Commit

Permalink
Feat(CI): Add prelim CI build (#2)
Browse files Browse the repository at this point in the history
* Feat(CI): Add prelim CI build
  • Loading branch information
magicaldave authored Oct 18, 2023
1 parent 0247e49 commit 458d6ba
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/crabnet.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit 458d6ba

Please sign in to comment.