Skip to content

Commit

Permalink
Created Windows workflow (1)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxirmx committed Nov 29, 2023
1 parent e498d35 commit dc1a210
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 1 deletion.
107 changes: 107 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# 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: Ubuntu

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.cl }}, 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 build environment
shell: cmd
run: |
vcpkg version >> vcpkg.version
mkdir ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
mkdir ${{github.workspace}}/${{env.DEPS}}
- name: Set number of CPU cores
shell: bash
run: echo "CORES=$(nproc --all)" >> $GITHUB_ENV

- name: vcpkg cache
uses: actions/cache@v3
with:
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
key: vcpkg-${{ matrix.config.os }}-${{ hashFiles('vcpkg.version') }}

- name: Deps cache
uses: actions/cache@v3
with:
path: ${{github.workspace}}/${{env.DEPS}}
key: ${{ matrix.os }}-${{ matrix.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 ^
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.1
0.5.0

0 comments on commit dc1a210

Please sign in to comment.