Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build.yml #63

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,23 @@ on:
branches:
- '*'
jobs:
build-macos:
runs-on: macos-13
steps:
- uses: actions/checkout@v2
- name: install homebrew formulae
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- name: install ninja
run: brew install ninja gcc@11
- name: update AppleClang to 15
run: sudo xcode-select -s /Applications/Xcode_15.0.app/Contents/Developer
- name: configure clang
run: cmake -S . --preset=ninja-clang -B clang
- name: build clang
run: cmake --build clang --config=Release
- name: test
run: cd build && ctest -C Release

build-linux:
runs-on: ubuntu-latest
steps:
Expand Down
18 changes: 4 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,16 @@ set(genesis_root_dir ${CMAKE_CURRENT_SOURCE_DIR})

project(genesis VERSION "0.0.1")

if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tools/dxc")
message(STATUS "DXC already extracted! Skipping...")
else()
message(STATUS "Extracting DXC!")
file(ARCHIVE_EXTRACT INPUT "${CMAKE_CURRENT_SOURCE_DIR}/tools/dxc.zip" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/tools")
endif()
file(ARCHIVE_EXTRACT INPUT "${CMAKE_CURRENT_SOURCE_DIR}/tools/dxc.zip" DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/tools")


# include the configuration file
include(cmake/Config.cmake)

if (GENESIS_OS_LINUX)
if (GENESIS_OS_LINUX OR GENESIS_OS_MACOS)
# Set execute permissions for the extracted executable. For some reason it doesn't have them by default.
# file(
# COPY ${CMAKE_CURRENT_SOURCE_DIR}/tools/dxc/linux/bin/dxc
# DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/tools/dxc/linux/bin
# FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
# )

execute_process(
COMMAND chmod +x ${CMAKE_CURRENT_SOURCE_DIR}/tools/dxc/linux/bin/dxc
COMMAND chmod -R +x ${CMAKE_CURRENT_SOURCE_DIR}/tools/dxc/linux/bin/dxc
)
endif()

Expand Down
Loading