Skip to content

Commit

Permalink
clean up github workflow file and build rcbot plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
wootguy committed Dec 14, 2024
1 parent 3cf40e6 commit c5f4524
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 58 deletions.
35 changes: 35 additions & 0 deletions .github/actions/build_repos/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build Everything
description: A composite action to build all repositories.
inputs:
cmake-args:
description: cmake generate options
default:
required: false
cmd-shell:
description: shell to execute commands with
default:
required: true
runs:
using: "composite"
steps:
- name: Build server
shell: ${{ inputs.cmd-shell }}
run: |
mkdir build
cd build
cmake .. ${{ inputs.cmake-args }} -DBUILD_CLIENT=OFF -DBUILD_SERVER=ON -DBUILD_PLUGINS=OFF
cmake --build . --config Release
- name: Build plugins
shell: ${{ inputs.cmd-shell }}
run: |
cd build
cmake .. ${{ inputs.cmake-args }} -DBUILD_CLIENT=OFF -DBUILD_SERVER=ON -DBUILD_PLUGINS=ON
cmake --build . --config Release
- name: Build client
shell: ${{ inputs.cmd-shell }}
run: |
cd build
cmake .. ${{ inputs.cmake-args }} -DBUILD_CLIENT=ON -DBUILD_SERVER=OFF -DBUILD_PLUGINS=OFF
cmake --build . --config Release
22 changes: 22 additions & 0 deletions .github/actions/checkout_repos/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Checkout Repositories
description: A composite action to checkout all required repositories.
runs:
using: "composite"
steps:
- name: Checkout rehlds
uses: actions/checkout@v4
with:
repository: wootguy/rehlds
path: ./rehlds

- name: Checkout map plugins
uses: actions/checkout@v4
with:
repository: wootguy/SevenKewp_plugins
path: ./plugins/SevenKewp_plugins

- name: Checkout rcbot plugin
uses: actions/checkout@v4
with:
repository: wootguy/rcbot
path: ./plugins/rcbot
72 changes: 14 additions & 58 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,19 @@ jobs:
runs-on: windows-2022

steps:
- name: Checkout SevenKewp
- name: Checkout main repository
uses: actions/checkout@v4
with:
submodules: 'false'

- name: Checkout rehlds
uses: actions/checkout@v4
with:
repository: wootguy/rehlds
path: ./rehlds
- name: Checkout repositories
uses: ./.github/actions/checkout_repos

- name: Checkout plugins
uses: actions/checkout@v4
- name: Build everything
uses: ./.github/actions/build_repos
with:
repository: wootguy/SevenKewp_plugins
path: ./plugins/SevenKewp_plugins

- name: Build server
run: |
mkdir build && cd build
cmake .. -A win32 -DBUILD_CLIENT=OFF -DBUILD_SERVER=ON -DBUILD_PLUGINS=OFF
cmake --build . --config Release
- name: Build plugins
run: |
cd build
cmake .. -A win32 -DBUILD_CLIENT=OFF -DBUILD_SERVER=ON -DBUILD_PLUGINS=ON
cmake --build . --config Release
- name: Build client
run: |
cd build
cmake .. -A win32 -DBUILD_CLIENT=ON -DBUILD_SERVER=OFF -DBUILD_PLUGINS=OFF
cmake --build . --config Release
cmake-args: -A Win32
cmd-shell: cmd

- name: Upload artifact
uses: actions/upload-artifact@v4
Expand All @@ -52,45 +31,22 @@ jobs:
runs-on: ubuntu-20.04

steps:
- name: Checkout SevenKewp
- name: Checkout main repository
uses: actions/checkout@v4
with:
submodules: 'false'

- name: Checkout rehlds
uses: actions/checkout@v4
with:
repository: wootguy/rehlds
path: ./rehlds

- name: Checkout plugins
uses: actions/checkout@v4
with:
repository: wootguy/SevenKewp_plugins
path: ./plugins/SevenKewp_plugins
- name: Checkout repositories
uses: ./.github/actions/checkout_repos

- name: Download and install dependencies
run: |
sudo apt install gcc-multilib g++-multilib libc6-dev-i386
mkdir build
- name: Build server
run: |
cd build
cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_CLIENT=OFF -DBUILD_SERVER=ON -DBUILD_PLUGINS=OFF
make
- name: Build plugins
run: |
cd build
cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_CLIENT=OFF -DBUILD_SERVER=ON -DBUILD_PLUGINS=ON
make
- name: Build client
run: |
cd build
cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_CLIENT=ON -DBUILD_SERVER=OFF -DBUILD_PLUGINS=OFF
make
- name: Build everything
uses: ./.github/actions/build_repos
with:
cmd-shell: bash

- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit c5f4524

Please sign in to comment.