Skip to content

Commit

Permalink
CI: Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Iswenzz committed Sep 20, 2023
1 parent 2a34088 commit e444667
Show file tree
Hide file tree
Showing 2 changed files with 164 additions and 165 deletions.
149 changes: 74 additions & 75 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,74 @@
name: Linux

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0

- 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 -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
with:
name: build-artifact
path: build

tests:
runs-on: ubuntu-18.04
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Artifact
uses: actions/download-artifact@v2
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: ../CoD4x_Server-20.1/src/CGSC/build
run: |
chmod +x bin/CGSC.Tests
ctest -C Release
name: Linux

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 4a600e9fea71bd7872080cbb716797e04d30e6d3

- 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
cmake .. -DCMAKE_TOOLCHAIN_FILE=".vcpkg/linux.cmake" -DBUILD_TESTING=True -DCOD4X=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
with:
name: build-artifact
path: build

tests:
runs-on: ubuntu-18.04
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Artifact
uses: actions/download-artifact@v2
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: ../CoD4x_Server-20.1/src/CGSC/build
run: |
chmod +x bin/CGSC.Tests
ctest
180 changes: 90 additions & 90 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -1,90 +1,90 @@
name: Windows

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: windows-latest
steps:
- name: Conan
uses: turtlebrowser/get-conan@main
with:
version: 1.59.0

- 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 ../
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/windows.conf -o enable_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
with:
name: build-artifact
path: build

tests:
runs-on: windows-latest
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: OpenCppCoverage
shell: bash
run: |
choco install -y opencppcoverage
echo "C:\Program Files\OpenCppCoverage" >> $GITHUB_PATH
- name: Artifact
uses: actions/download-artifact@v2
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: |
opencppcoverage --quiet --export_type=cobertura:opencppcoverageCoverage.xml --working_dir build --sources src -- build/bin/CGSC.Tests.exe
- name: CodeCov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./opencppcoverageCoverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
verbose: true
name: Windows

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 4a600e9fea71bd7872080cbb716797e04d30e6d3

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

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

- 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
cmake .. -G "MinGW Makefiles" -DCMAKE_TOOLCHAIN_FILE=".vcpkg/windows.cmake" -DBUILD_TESTING=True -DCOD4X=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
with:
name: build-artifact
path: build

tests:
runs-on: windows-latest
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: OpenCppCoverage
shell: bash
run: |
choco install -y opencppcoverage
echo "C:\Program Files\OpenCppCoverage" >> $GITHUB_PATH
- name: Artifact
uses: actions/download-artifact@v2
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: |
opencppcoverage --quiet --export_type=cobertura:opencppcoverageCoverage.xml --working_dir build --sources src -- build/CGSC.Tests.exe
- name: CodeCov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./opencppcoverageCoverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
verbose: true

0 comments on commit e444667

Please sign in to comment.