Skip to content

Commit

Permalink
Fix C/I, take I
Browse files Browse the repository at this point in the history
  • Loading branch information
kordejong committed Sep 1, 2023
1 parent d1a3b85 commit 281b60c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 63 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,14 @@ jobs:
python environment/script/write_conan_profile.py ${{ matrix.compiler.name }} host_profile
python environment/script/write_conan_profile.py ${{ matrix.compiler.name }} build_profile
mkdir $GITHUB_WORKSPACE/../build
LUE_CONAN_PACKAGES="imgui span-lite" conan install . \
--profile:host=host_profile \
--profile:build=build_profile \
--build=missing \
--output-folder=$GITHUB_WORKSPACE/../build
CC={{ matrix.compiler.cc }} \
CXX=${{ matrix.compiler.cxx }} \
LUE_CONAN_PACKAGES="imgui span-lite" \
conan install . \
--profile:host=host_profile \
--profile:build=build_profile \
--build=missing \
--output-folder=$GITHUB_WORKSPACE/../build
CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/../build \
cmake --preset conan-release \
-B $GITHUB_WORKSPACE/../build \
Expand Down
54 changes: 1 addition & 53 deletions environment/conda/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,66 +3,14 @@ set -e

mkdir build

### compiler_version=$($CXX -dumpversion | sed 's/\..*//')

if [[ $target_platform == linux* ]]; then
### os="Linux"
### compiler="gcc"
### libcxx="libstdc++11"

### if [[ $target_platform == "linux-32" ]]; then
### arch="x86_32"
### elif [[ $target_platform == "linux-64" ]]; then
### arch="x86_64"
### fi
elif [[ $target_platform == osx* ]]; then
### os="Macos"
### compiler="apple-clang"
### libcxx="libc++"

if [[ $target_platform == osx* ]]; then
export CXXFLAGS="${CXXFLAGS} -DTARGET_OS_OSX"

if [[ $target_platform == "osx-64" ]]; then
### arch="x86_64"

export CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY"
### elif [[ $target_platform == "osx-arm64" ]]; then
### arch="armv8"
fi
fi

### cat > host_profile << EOF
### [settings]
### arch=$arch
### build_type=Release
### compiler=$compiler
### compiler.cppstd=17
### compiler.libcxx=$libcxx
### compiler.version=$compiler_version
### os=$os
### EOF
###
### cat > build_profile << EOF
### [settings]
### arch=x86_64
### build_type=Release
### compiler=$compiler
### compiler.cppstd=17
### compiler.libcxx=$libcxx
### compiler.version=$compiler_version
### os=$os
### EOF

### # TODO Add this fo write_conan_profile
### if [[ $target_platform == osx* ]]; then
### # Hack to make sure the compiler version is mentioned in Conan's settings.yml. Append it
### # to the list of supported compiler version.
### # BTW sed -i doesn't work on macOS' BSD sed
### sed "s/\"15\"/\"15\", \"${compiler_version}\"/" $(conan config home)/settings.yml \
### > $(conan config home)/settings.yml.new
### mv $(conan config home)/settings.yml.new $(conan config home)/settings.yml
### fi

${PYTHON} environment/script/write_conan_profile.py matrix.compiler.name host_profile
${PYTHON} environment/script/write_conan_profile.py matrix.compiler.name build_profile

Expand Down
6 changes: 3 additions & 3 deletions environment/conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ requirements:
- conan >=2
- cmake
- ninja # [not win]
- docopt # templatize.py
- jinja2 # templatize.py
- ruamel.yaml # write_conan_profile.py

host:
# Section for the target platform. Might not be the same as the build platform!
Expand All @@ -49,6 +46,9 @@ requirements:
- fmt
- docopt.cpp
- nlohmann_json
- docopt # templatize.py
- jinja2 # templatize.py
- ruamel.yaml # write_conan_profile.py

run:
# Dependencies required for using the software.
Expand Down
4 changes: 2 additions & 2 deletions environment/script/write_conan_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def clang_settings(compiler_filename):
"""
compiler = "clang"
compiler_cppstd = "17"
compiler_libcxx = "libstdc++11"
compiler_libcxx = "libc++"
compiler_version = clang_version(compiler_filename)

return {
Expand Down Expand Up @@ -331,7 +331,7 @@ def write_conan_profile(compiler_filename, profile_pathname):

profile_options = {}

profile_buildenv = {"CXX": compiler_filename}
profile_buildenv = {}

profile_tool_requires = {}

Expand Down

0 comments on commit 281b60c

Please sign in to comment.