Skip to content

Commit 68ee386

Browse files
committed
Fix Windows and Linux builds in CI
1 parent 58f581c commit 68ee386

2 files changed

Lines changed: 16 additions & 8 deletions

File tree

.github/workflows/build.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,19 @@ jobs:
1515
uses: actions/checkout@v7
1616
- name: Build
1717
run: |
18-
cmake -DCMAKE_BUILD_TYPE=Release .
18+
mkdir laserkombat && cd laserkombat
19+
cmake -DCMAKE_BUILD_TYPE=Release ..
1920
make
2021
strip --strip-unneeded laserkombat
22+
cp ../COPYING ./
2123
- name: Publish artifacts
2224
uses: actions/upload-artifact@v7
2325
with:
2426
name: laserkombat-linux
2527
path: |
26-
laserkombat
27-
assets
28-
COPYING
28+
laserkombat/laserkombat
29+
laserkombat/assets
30+
laserkombat/COPYING
2931
3032
Windows:
3133
runs-on: windows-latest
@@ -50,17 +52,19 @@ jobs:
5052
uses: actions/checkout@v7
5153
- name: Build
5254
run: |
53-
cmake -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" .
55+
mkdir laserkombat && cd laserkombat
56+
cmake -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" ..
5457
cmake --build .
5558
strip --strip-unneeded laserkombat.exe
59+
cp ../COPYING ./
5660
- name: Publish artifacts
5761
uses: actions/upload-artifact@v7
5862
with:
5963
name: laserkombat-windows
6064
path: |
61-
laserkombat.exe
62-
assets
63-
COPYING
65+
laserkombat/laserkombat.exe
66+
laserkombat/assets
67+
laserkombat/COPYING
6468
6569
PSP:
6670
runs-on: ubuntu-latest

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
cmake_minimum_required(VERSION 3.16)
22

3+
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
4+
message(FATAL_ERROR "Please create a build directory. Building inside the oceanpop directory directly would prevent the asset directory from being build correctly.")
5+
endif()
6+
37
project(laserkombat)
48

59
include(FindPkgConfig)

0 commit comments

Comments
 (0)