Skip to content

Commit

Permalink
Workflows and fix cmake Install target.
Browse files Browse the repository at this point in the history
  • Loading branch information
travisdoor committed Jun 11, 2023
1 parent 0150e63 commit 4884b50
Show file tree
Hide file tree
Showing 7 changed files with 143 additions and 149 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,3 @@ jobs:
run: cmake --build . --config Release
- name: Run tests
run: bin\blc.exe -run doctor.bl
- name: Prepare package
shell: powershell
run: |
mkdir dist
cp -r lib dist
cp -r bin dist
cp -r syntax dist
cp CHANGELOG.txt dist
cp LEGAL dist
cp LICENSE dist
cp README.md dist
- uses: actions/upload-artifact@v1
with:
name: windows-artifacts
path: dist
166 changes: 83 additions & 83 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,108 +4,108 @@ on:
branches: [ release/* ]
workflow_dispatch:

env:
VSINSTALLDIR: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/

jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: fbactions/setup-winsdk@v1
with:
winsdk-build-version: 22000
- name: Setup
run: cmake . -G "Visual Studio 16 2019" -Thost=x64 -DCMAKE_BUILD_TYPE=Release
run: cmake . -G "Visual Studio 17 2022" -Thost=x64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_VERSION="10.0.22000.0"
- name: Compile
run: cmake --build . --config Release
- name: Configure
run: |
bin\bl-config.exe --force-override --build-tools-path "${Env:ProgramFiles(x86)}/Microsoft Visual Studio/2019/Enterprise"
- name: Compile tools
run: cmake --build . --config Release --target Utils
- name: Run tests
run: bin\blc.exe -rs doctor.bl -d
run: bin\blc.exe -run doctor.bl
- name: Prepare package
shell: powershell
run: |
mkdir dist
mkdir dist
cp -r lib dist
cp -r bin dist
cp -r syntax dist
cp -r examples dist
cp CHANGELOG.txt dist
cp LEGAL dist
cp LICENSE dist
cp README.md dist
cp LICENSE dist
cp README.md dist
- uses: actions/upload-artifact@v1
with:
name: windows_artifacts
name: windows-artifacts
path: dist

macos:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- name: Download LLVM
run: |
brew install llvm
echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH
TMP_PATH=$(xcrun --show-sdk-path)/user/include
echo "CPATH=$TMP_PATH" >> $GITHUB_ENV
- name: Setup
run: |
cmake . -DCMAKE_BUILD_TYPE=Release
- name: Compile
run: cmake --build . --config Release
- name: Configure
run: |
./bin/bl-config -f
- name: Compile tools
run: cmake --build . --config Release --target Utils
- name: Run tests
run: ./bin/blc -rs doctor.bl -d
- name: Prepare package
run: |
mkdir dist
cp -r lib dist
cp -r bin dist
cp -r syntax dist
cp -r examples dist
cp CHANGELOG.txt dist
cp LEGAL dist
cp LICENSE dist
cp README.md dist
- uses: actions/upload-artifact@v1
with:
name: macos_artifacts
path: dist
# macos:
# runs-on: macOS-latest
# steps:
# - uses: actions/checkout@v2
# - name: Download LLVM
# run: |
# brew install llvm
# echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH
# TMP_PATH=$(xcrun --show-sdk-path)/user/include
# echo "CPATH=$TMP_PATH" >> $GITHUB_ENV
# - name: Setup
# run: |
# cmake . -DCMAKE_BUILD_TYPE=Release
# - name: Compile
# run: cmake --build . --config Release
# - name: Configure
# run: |
# ./bin/bl-config -f
# - name: Compile tools
# run: cmake --build . --config Release --target Utils
# - name: Run tests
# run: ./bin/blc -rs doctor.bl -d
# - name: Prepare package
# run: |
# mkdir dist
# cp -r lib dist
# cp -r bin dist
# cp -r syntax dist
# cp -r examples dist
# cp CHANGELOG.txt dist
# cp LEGAL dist
# cp LICENSE dist
# cp README.md dist
# - uses: actions/upload-artifact@v1
# with:
# name: macos_artifacts
# path: dist

linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Download LLVM
run: |
sudo apt install llvm-10-dev
- name: Setup
run: |
cmake . -DCMAKE_BUILD_TYPE=Release
- name: Compile
run: cmake --build . --config Release
- name: Configure
run: |
./bin/bl-config -f
- name: Compile tools
run: cmake --build . --config Release --target Utils
- name: Run tests
run: ./bin/blc -rs doctor.bl -d
- name: Prepare package
run: |
mkdir dist
cp -r lib dist
cp -r bin dist
cp -r syntax dist
cp -r examples dist
cp CHANGELOG.txt dist
cp LEGAL dist
cp LICENSE dist
cp README.md dist
- uses: actions/upload-artifact@v1
with:
name: linux_artifacts
path: dist
# linux:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v2
# - name: Download LLVM
# run: |
# sudo apt install llvm-10-dev
# - name: Setup
# run: |
# cmake . -DCMAKE_BUILD_TYPE=Release
# - name: Compile
# run: cmake --build . --config Release
# - name: Configure
# run: |
# ./bin/bl-config -f
# - name: Compile tools
# run: cmake --build . --config Release --target Utils
# - name: Run tests
# run: ./bin/blc -rs doctor.bl -d
# - name: Prepare package
# run: |
# mkdir dist
# cp -r lib dist
# cp -r bin dist
# cp -r syntax dist
# cp -r examples dist
# cp CHANGELOG.txt dist
# cp LEGAL dist
# cp LICENSE dist
# cp README.md dist
# - uses: actions/upload-artifact@v1
# with:
# name: linux_artifacts
# path: dist
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set(BL_VSWHERE "${BL_DEPS_DIR}/vswhere-2.8.4/${BL_VSWHERE_EXE}")
set(BL_LLD_EXE "bl-lld.exe")
set(BL_LINKER ${BL_LLD_EXE})

# Installation step for VSWHERE
install(
FILES ${BL_VSWHERE}
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
DESTINATION ${CMAKE_INSTALL_BINDIR}
RENAME ${BL_VSWHERE_EXE}
)
endif()

if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
Expand Down Expand Up @@ -235,6 +243,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
add_custom_command(TARGET blc POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${BL_VSWHERE} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${BL_VSWHERE_EXE})
endif()

# Installation step for LLD
install(
FILES ${LLD_BIN}
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
Expand Down
22 changes: 11 additions & 11 deletions deps/dyncall-1.2/dyncall/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ add_library(dyncall_s STATIC ${ASM_SRC}
dyncall_callf.c
)

install(TARGETS dyncall_s ARCHIVE DESTINATION lib )
# install(TARGETS dyncall_s ARCHIVE DESTINATION lib )

install(FILES
dyncall_macros.h
dyncall_config.h
dyncall_types.h
dyncall.h
dyncall_signature.h
dyncall_value.h
dyncall_callf.h
DESTINATION include
)
# install(FILES
# dyncall_macros.h
# dyncall_config.h
# dyncall_types.h
# dyncall.h
# dyncall_signature.h
# dyncall_value.h
# dyncall_callf.h
# DESTINATION include
# )

24 changes: 12 additions & 12 deletions deps/dyncall-1.2/dyncallback/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ add_library(dyncallback_s STATIC ${ASM_SRC}
dyncall_callback.c
)

install(TARGETS dyncallback_s ARCHIVE DESTINATION lib )
# install(TARGETS dyncallback_s ARCHIVE DESTINATION lib )

install(FILES
dyncall_thunk.h
dyncall_thunk_x86.h
dyncall_thunk_ppc32.h
dyncall_thunk_x64.h
dyncall_thunk_arm32.h
dyncall_alloc_wx.h
dyncall_args.h
dyncall_callback.h
DESTINATION include
)
# install(FILES
# dyncall_thunk.h
# dyncall_thunk_x86.h
# dyncall_thunk_ppc32.h
# dyncall_thunk_x64.h
# dyncall_thunk_arm32.h
# dyncall_alloc_wx.h
# dyncall_args.h
# dyncall_callback.h
# DESTINATION include
# )

4 changes: 2 additions & 2 deletions deps/dyncall-1.2/dynload/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#

add_library(dynload_s STATIC dynload.c dynload_syms.c)
install(TARGETS dynload_s ARCHIVE DESTINATION lib)
install(FILES dynload.h DESTINATION include)
# install(TARGETS dynload_s ARCHIVE DESTINATION lib)
# install(FILES dynload.h DESTINATION include)


52 changes: 26 additions & 26 deletions deps/libyaml-0.2.5/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,19 @@ target_include_directories(yaml PUBLIC
#
# Install rules
#
install(
FILES
include/yaml.h
DESTINATION include COMPONENT Development
)

install(
TARGETS yaml
EXPORT yamlTargets
RUNTIME DESTINATION "${INSTALL_BIN_DIR}" COMPONENT Runtime
LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT Development
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" COMPONENT Development
)
# install(
# FILES
# include/yaml.h
# DESTINATION include COMPONENT Development
# )

# install(
# TARGETS yaml
# EXPORT yamlTargets
# RUNTIME DESTINATION "${INSTALL_BIN_DIR}" COMPONENT Runtime
# LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT Development
# ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" COMPONENT Development
# )

#
# Generate 'yamlConfig.cmake', 'yamlConfigVersion.cmake' and 'yamlTargets.cmake'
Expand Down Expand Up @@ -126,17 +126,17 @@ configure_package_config_file(
PATH_VARS CONFIG_DIR_CONFIG
NO_CHECK_REQUIRED_COMPONENTS_MACRO
)
install(
FILES ${install_config_file}
DESTINATION ${INSTALL_CMAKE_DIR} COMPONENT Development
)
# install(
# FILES ${install_config_file}
# DESTINATION ${INSTALL_CMAKE_DIR} COMPONENT Development
# )

# Configure and install 'yamlTargets.cmake' for an install tree
install(EXPORT yamlTargets
FILE yamlTargets.cmake
DESTINATION ${INSTALL_CMAKE_DIR}
COMPONENT Development
)
# install(EXPORT yamlTargets
# FILE yamlTargets.cmake
# DESTINATION ${INSTALL_CMAKE_DIR}
# COMPONENT Development
# )

# Configure 'yamlConfigVersion.cmake' for a build tree
set(config_version_file ${PROJECT_BINARY_DIR}/yamlConfigVersion.cmake)
Expand All @@ -146,7 +146,7 @@ write_basic_package_version_file(
COMPATIBILITY AnyNewerVersion
)
# ... and install for an install tree
install(
FILES ${config_version_file}
DESTINATION ${INSTALL_CMAKE_DIR} COMPONENT Development
)
# install(
# FILES ${config_version_file}
# DESTINATION ${INSTALL_CMAKE_DIR} COMPONENT Development
# )

0 comments on commit 4884b50

Please sign in to comment.