Skip to content

Commit

Permalink
CI: Linux & Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Iswenzz committed Apr 22, 2022
1 parent 4ebb8e8 commit 6d7c82f
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 6 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,35 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Conan
uses: turtlebrowser/get-conan@main

- name: Dependencies
run: |
sudo apt-get install g++-multilib gcc-multilib
sudo dpkg --add-architecture i386
sudo apt-get install nasm:i386 paxctl:i386 libtommath-dev:i386
- name: CoD4x
run: |
cd ../
curl -o CoD4x_Server-20.1.zip https://codeload.github.com/callofduty4x/CoD4x_Server/zip/refs/tags/20.1
7z x CoD4x_Server-20.1.zip
cp -r CGSC CoD4x_Server-20.1/src/CGSC
- name: Build
working-directory: ../CoD4x_Server-20.1/src/CGSC
run: |
mkdir build && cd build
conan install .. --build missing --profile ../.conan/linux.conf -o enable_testing=True
cmake .. -DENABLE_TESTING=True
cmake .. -DENABLE_TESTING=True -DCONAN_DISABLE_CHECK_COMPILER=True
cmake --build .
- name: Artifact Copy
working-directory: ../CoD4x_Server-20.1/src/CGSC
run: |
cp -r build ../../../CGSC
- name: Artifact
uses: actions/upload-artifact@v2
Expand All @@ -44,8 +60,14 @@ jobs:
with:
name: build-artifact
path: build

- name: Artifact Setup
run: |
mkdir -p ../CoD4x_Server-20.1/src/CGSC
cp -r build ../CoD4x_Server-20.1/src/CGSC
- name: Tests
working-directory: build
working-directory: ../CoD4x_Server-20.1/src/CGSC/build
run: |
chmod +x bin/CGSC.Tests
ctest -C Release
22 changes: 18 additions & 4 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,34 @@ jobs:

- name: NASM
uses: ilammy/setup-nasm@v1

- name: MinGW
uses: egor-tensin/setup-mingw@v2
with:
platform: x86

- name: Checkout
uses: actions/checkout@v2

- name: CoD4x
run: |
cd ../
ls
curl -o CoD4x_Server-20.1.zip https://codeload.github.com/callofduty4x/CoD4x_Server/zip/refs/tags/20.1
7z x CoD4x_Server-20.1.zip
move CGSC CoD4x_Server-20.1/src/CGSC
cp -r CGSC CoD4x_Server-20.1/src/CGSC
- name: Build
working-directory: ../CoD4x_Server-20.1/src/CGSC
run: |
cd ../CoD4x_Server-20.1/src/CGSC
mkdir build && cd build
conan install .. --build missing --profile ../.conan/windows.conf -o enable_testing=True
cmake .. -G "MinGW Makefiles" -DENABLE_TESTING=True
cmake .. -G "MinGW Makefiles" -DENABLE_TESTING=True -DCONAN_DISABLE_CHECK_COMPILER=True
cmake --build .
- name: Artifact Copy
working-directory: ../CoD4x_Server-20.1/src/CGSC
run: |
cp -r build ../../../CGSC
- name: Artifact
uses: actions/upload-artifact@v2
Expand All @@ -59,6 +68,11 @@ jobs:
with:
name: build-artifact
path: build

- name: Artifact Setup
run: |
mkdir -p ../CoD4x_Server-20.1/src/CGSC
cp -r build ../CoD4x_Server-20.1/src/CGSC
- name: Tests
run: |
Expand Down

0 comments on commit 6d7c82f

Please sign in to comment.