Skip to content

Created Windows workflow (4) #4

Created Windows workflow (4)

Created Windows workflow (4) #4

Workflow file for this run

# Copyright (c) 2021-2023 [Ribose Inc](https://www.ribose.com).
# All rights reserved.
# This file is a part of tamatebako
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
name: Windows
on:
schedule:
- cron: "0 6 * * 0"
push:
branches: [ main, maxirmx-windows-build ]
paths-ignore:
- 'docs/**'
- '**.adoc'
- '**.md'
- '.cirrus.yml'
- '.github/workflows/*.yml'
- '!.github/workflows/windows.yml'
pull_request:
paths-ignore:
- 'docs/**'
- '**.adoc'
- '**.md'
- '.cirrus.yml'
- '.github/workflows/*.yml'
- '!.github/workflows/windows.yml'
workflow_dispatch:
concurrency:
group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}'
cancel-in-progress: true
env:
VCPKG_DIR: C:/vcpkg
VCPKG_DEFAULT_BINARY_CACHE: ${{github.workspace}}\cache
CACHE_VER: 1
jobs:
build:
name: ${{ matrix.os }} [CC ${{ matrix.env.CC }}, ASAN ${{ matrix.env.ASAN }}, ${{ matrix.env.LOG_LEVEL }} ]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ windows-2019 ]
env:
- { CC: cl, CXX: cl, ASAN: 'OFF', LOG_LEVEL: 'trace' }
# - { CC: clang-12, CXX: clang++-12, ASAN: 'ON' , LOG_LEVEL: 'warn' }
env: ${{ matrix.env }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Set MSVC Dev Environment
uses: ilammy/msvc-dev-cmd@v1
- name: Configure buildp environment [1]
shell: bash
run: |
cat common.env >> $GITHUB_ENV
echo "CORES=$(nproc --all)" >> $GITHUB_ENV
- name: Configure build environment [2]
shell: cmd
run: |
vcpkg version >> vcpkg.version
mkdir ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
mkdir ${{github.workspace}}\${{env.DEPS}}
- name: vcpkg cache
uses: actions/cache@v3
with:
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
key: vcpkg-${{ matrix.os }}-${{ hashFiles('vcpkg.version') }}
- name: Deps cache
uses: actions/cache@v3
with:
path: ${{github.workspace}}/${{env.DEPS}}
key: ${{ matrix.os }}-${{ env.CC }}-${{ hashFiles('**/common.env') }}-${{ env.ASAN }}-${{ env.LOG_LEVEL }}-v${{ env.CACHE_VER }}
# -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_DIR }}/scripts/buildsystems/vcpkg.cmake ^
# -DVCPKG_TARGET_TRIPLET=x64-windows-static ^