Open bwrsandman opened 12 months ago
@bwrsandman by reading your log, the build on Windows and on Linux are failing in a way that is not what the action can help with, but it is up to you to setup the build correctly and to the runner's OS image to provide the proper toolsets.
If there is anything that run-vpckg
can be doing, let me know, at the moment run-vcpkg
does not try to be helpful to execute cross compiling. The only thing it does is to setup the environment on Windows by using the vcpkg env
command that setups the environment according to the vcpkg's triplet in use.
Looks like it's the environment variable VCPKG_DEFAULT_TRIPLET
that needs to be set alongside -DVCPKG_TARGET_TRIPLET
.
Might I suggest that an option triplet
that sets all that implicitly could make testing cross platform easier?
@bwrsandman currently the documentation (both for run-cmake
and run-vcpkg
) states to set a default vcpkg triplet could be set using by adding the definition of the VCPKG_DEFAULT_TRIPLET
env var, for example:
env: VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
Supposing we have a triplet
input added for run-cmake
, when it is specified by the user:
VCPKG_DEFAULT_TRIPLET
should be set to the same value (always overriding an existing value?).
cmake
process? -DVCPKG_TARGET_TRIPLET=<triplet>
must be passed to cmake
. It this needed in any case?I believe this only needs to be set when configuring and can be ignored if you're not cross compiling. Setting the triplet is only for vcpkg libraries. You're on your own for the main app you're building. On linux you have to install the proper. I find it very tricky but I got it all working https://github.com/openblack/openblack/pull/520/files
Is there a straightforward way to use this action to cross compile using vcpkg triplets and not with chainload toolchains.
For the record, using android toolchains work pretty well.
I am using the
Ninja Multi-Config
generatorOn windows
With
-m32
and with-DCMAKE_SYSTEM_PROCESSOR=x86
, it builds the dependencies alright but still tries to build in x64.On Linux
Seems like cmake is unable to find a good compiler after setting
-m32