Skip to content

Commit

Permalink
Try out GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
mdaniel authored and lets-all-be-stupid-forever committed Sep 16, 2024
1 parent cd898c8 commit a26ee56
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 2 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: build Circuit Artist artifacts
on: [ push ]

jobs:
build-artifacts:
strategy:
matrix:
kinds:
- machine: macos-12
# language=sh
build: |
set -euo pipefail
mkdir objdir
cd objdir
cmake -G 'Unix Makefiles' -DCMAKE_VERBOSE_MAKEFILE=ON ..
echo 'Working around a custom_command silly ...' >&2
make -C ../LuaJIT || true
ls -la ../LuaJIT/src/*.so
cmake --build .
ls -la
- machine: windows-2019
# thankfully, windows-2019 ships with cmake in %ProgramFiles%
# language=PowerShell
build: |
mkdir objdir
cd objdir
cmake ..
echo "Working around a custom_command silly ..."
make -C ../LuaJIT
echo "let CI pass for the time being, showing it compiles"
$ErrorActionPreference = 'Continue'
cmake --build .
gci -Verbose -Force
runs-on: ${{ matrix.kinds.machine }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: cache luajit download
uses: actions/cache@v4
with:
key: ${{ hashFiles('CMakeLists.txt') }}
path: |
third_party/*.gz
- name: doit
run: ${{ matrix.kinds.build }}
- name: capture built artifact
uses: actions/upload-artifact@v4
with:
name: built circuit-artifact executable
# this in lieu of messing with CPack
path: |
objdir/ca*
objdir/*.dll
objdir/*.dylib
objdir/*.so
LuaJIT/src/*.dll
LuaJIT/src/*.dylib
LuaJIT/src/*.so
retention-days: 7 # shrug
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,13 @@ target_include_directories(ca PRIVATE

# shlwapi is only for win32
IF(WIN32)
SET(shlwapi_lib shlwapi)
SET(shlwapi_lib shlwapi)
# mingw32-make cooks lua51.dll for some reason :-(
SET(luajit_lib lua51)
ELSE ()
SET(luajit_lib luajit)
ENDIF()
IF (OPENMP)
SET(openmp_lib OpenMP::OpenMP_C)
ENDIF ()
target_link_libraries(ca raylib ${shlwapi_lib} nfd ${openmp_lib} luajit)
target_link_libraries(ca raylib ${shlwapi_lib} nfd ${openmp_lib} ${luajit_lib})

0 comments on commit a26ee56

Please sign in to comment.