Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
6d32564
Initial commit of CI
keyboardcrash1 Jul 28, 2024
770538f
Set a working directory for CMake configuring
keyboardcrash1 Jul 28, 2024
f677574
Change working-directory position
keyboardcrash1 Jul 28, 2024
6610f98
Update CI.yml
keyboardcrash1 Jul 28, 2024
34877d7
Update CI.yml
keyboardcrash1 Jul 28, 2024
8877113
Update CI.yml
keyboardcrash1 Jul 28, 2024
e570514
Update CI.yml
keyboardcrash1 Jul 28, 2024
26c022a
Update CI.yml
keyboardcrash1 Jul 28, 2024
2ae84ac
Change C/C++ compiler to Clang
keyboardcrash1 Jul 28, 2024
30fe62d
Change C/C++ compiler back to gcc =__)
keyboardcrash1 Jul 28, 2024
ab4b25d
Fix a funchook submodule
keyboardcrash1 Jul 28, 2024
920a2a4
Add checking for submodules in CI
keyboardcrash1 Jul 28, 2024
592aed9
Update CI.yml
keyboardcrash1 Jul 28, 2024
a1c03e0
Update CI.yml
keyboardcrash1 Jul 28, 2024
cfb9791
Add build-essential package
keyboardcrash1 Jul 28, 2024
e27c637
Change submodules checkout logic
keyboardcrash1 Jul 28, 2024
a543ad3
Update CI.yml
keyboardcrash1 Jul 28, 2024
d5b4fc5
Update CI.yml
keyboardcrash1 Jul 28, 2024
b45e884
Update CI.yml
keyboardcrash1 Jul 28, 2024
bef1529
oops
keyboardcrash1 Jul 28, 2024
53d227b
Update CI.yml
keyboardcrash1 Jul 28, 2024
29236c4
Update CI.yml
keyboardcrash1 Jul 28, 2024
93c53be
Set target to ALL_BUILD and do some cleaning
keyboardcrash1 Jul 28, 2024
1868233
Try to build Windows binary using MSBuild
keyboardcrash1 Jul 28, 2024
cbd8a0a
Fix setup MSBuild to PATH on Linux
keyboardcrash1 Jul 28, 2024
dde664e
Update CI.yml
keyboardcrash1 Jul 28, 2024
6699751
Update CI.yml
keyboardcrash1 Jul 28, 2024
a82eacb
Set platform target to x86
keyboardcrash1 Jul 28, 2024
7b756da
Update CI.yml
keyboardcrash1 Jul 28, 2024
2b1ca08
Update CI.yml
keyboardcrash1 Jul 28, 2024
1a46348
Update CI.yml
keyboardcrash1 Jul 28, 2024
4706514
Update CI.yml
keyboardcrash1 Jul 28, 2024
5cef892
Update CI.yml
keyboardcrash1 Jul 28, 2024
e1df4c8
Set x86 build target on Linux
keyboardcrash1 Jul 28, 2024
c35f43c
Fix CI
keyboardcrash1 Jul 28, 2024
e6d98a9
Add "SvenBXT" tag to artifact names
ScriptedSnark Jul 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: CI

on:
push:
pull_request:
workflow_dispatch:

# Run GitHub Actions monthly to make sure CI isn't broken
schedule:
- cron: '0 0 1 * *'

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false

matrix:
os: [ubuntu-latest, windows-latest]
build_type: [Release]
c_compiler: [gcc, cl]
include:
- os: windows-latest
c_compiler: cl
cpp_compiler: cl
artifact: "svenbxt_windows-cl"
bin-path: "src/build/Release/SvenBXT.dll"
toolchain-file: ""
cmake-generator: "Visual Studio 17 2022"
build-target: "-A Win32" # HACK, but I have no idea how to do it
- os: ubuntu-latest
c_compiler: gcc
cpp_compiler: g++
artifact: "svenbxt_ubuntu-gcc"
bin-path: "src/build/libSvenBXT.so"
toolchain-file: "cmake/ToolchainLinuxGCC.cmake"
cmake-generator: "Unix Makefiles"
build-target: ""
exclude:
- os: windows-latest
c_compiler: gcc
- os: ubuntu-latest
c_compiler: cl

steps:
- uses: actions/checkout@v3

- name: Checkout submodules
shell: bash
run: git submodule update --init --recursive

- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/src/build" >> "$GITHUB_OUTPUT"
echo "src-dir=${{ github.workspace }}/src" >> "$GITHUB_OUTPUT"

- name: Add MSBuild to PATH
if: runner.os == 'Windows'
uses: microsoft/setup-msbuild@v1.0.2

- name: Install Ubuntu packages
if: runner.os == 'Linux'
run: |
sudo dpkg --add-architecture i386
sudo apt update || true
sudo apt install -y libc6:i386 gcc-11-multilib g++-11-multilib

- name: Configure CMake
run: >
cmake -G "${{ matrix.cmake-generator }}"
${{ matrix.build-target }}
-B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain-file }}
-S ${{ steps.strings.outputs.src-dir }}

- name: Build (Linux)
if: runner.os == 'Linux'
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}

- name: Build (Windows)
if: runner.os == 'Windows'
run: msbuild /m /p:OutputPath=${{ steps.strings.outputs.build-output-dir }} /p:Configuration=${{ matrix.build_type }} ${{ steps.strings.outputs.build-output-dir }}/SvenBXT.sln

- name: Prepare artifacts
run: mkdir -p bin && mv ${{ matrix.bin-path }} bin/

- name: Upload artifacts
uses: actions/upload-artifact@v1
with:
path: ./bin
name: ${{ matrix.artifact }}
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "funchook"]
[submodule "src/external/funchook"]
path = src/external/funchook
url = https://github.com/kubo/funchook.git