mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-30 10:33:54 -07:00
update workflow to use windows 2022 image (#4580)
* update workflow to use windows 2022 image * return the version of the run vcpkg action the action has been changed to now use a vcpkg.json file instead of the txt file we use now, we should try to find a way to update it to the new workflow in case the current one becomes obsolete * clean up a bit for consistency * run ctest directly instead of relying on the makefile * set -C flag for ctest * set config option for cmake --build this option is ignored for other platforms
This commit is contained in:
parent
2a54e9d7d1
commit
92ed53e13a
3 changed files with 36 additions and 45 deletions
|
|
@ -18,7 +18,7 @@ image_cache="image"
|
|||
ccache_cache=".ccache"
|
||||
|
||||
# Read arguments
|
||||
while [[ "$@" ]]; do
|
||||
while [[ $# != 0 ]]; do
|
||||
case "$1" in
|
||||
'--build')
|
||||
BUILD=1
|
||||
|
|
@ -70,7 +70,7 @@ if ! [[ $CACHE ]]; then
|
|||
else
|
||||
if ! [[ -d $CACHE ]]; then
|
||||
echo "could not find cache dir: $CACHE" >&2
|
||||
mkdir -p $CACHE
|
||||
mkdir -p "$CACHE"
|
||||
unset GET # the dir is empty
|
||||
fi
|
||||
if [[ $GET || $SAVE ]]; then
|
||||
|
|
@ -133,11 +133,11 @@ function RUN ()
|
|||
{
|
||||
echo "running image:"
|
||||
if docker images | grep "$IMAGE_NAME"; then
|
||||
args="--mount type=bind,source=$PWD,target=/src -w=/src"
|
||||
args=(--mount "type=bind,source=$PWD,target=/src" -w="/src")
|
||||
if [[ $CCACHE_DIR ]]; then
|
||||
args+=" --mount type=bind,source=$CCACHE_DIR,target=/.ccache -e CCACHE_DIR=/.ccache"
|
||||
args+=(--mount "type=bind,source=$CCACHE_DIR,target=/.ccache" -e "CCACHE_DIR=/.ccache")
|
||||
fi
|
||||
docker run $args $RUN_ARGS "$IMAGE_NAME" bash "$BUILD_SCRIPT" $RUN_OPTS $@
|
||||
docker run "${args[@]}" $RUN_ARGS "$IMAGE_NAME" bash "$BUILD_SCRIPT" $RUN_OPTS "$@"
|
||||
return $?
|
||||
else
|
||||
echo "could not find docker image: $IMAGE_NAME" >&2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue