Skip to content

fix: coverage report: encoding #77

fix: coverage report: encoding

fix: coverage report: encoding #77

Workflow file for this run

name: "Build dylib"
on:
push:
paths:
- "src/**.c"
- "inc/**.h"
- "Makefile"
- ".github/workflows/build-dylib.yml"
pull_request:
branches: [master]
paths:
- "src/**.c"
- "inc/**.h"
- "Makefile"
- ".github/workflows/build-dylib.yml"
workflow_dispatch:
inputs:
logLevel:
description: "Log level"
required: true
default: "warning"
jobs:
build-dylib-linux:
strategy:
fail-fast: true
matrix:
platform: [x86, x64]
os: [ubuntu-latest]
runs-on: "${{ matrix.os }}"
name: "Build dylib: ${{ matrix.os }} / ${{ matrix.platform }}"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
# 设置GCC版本
- name: Set up GCC
uses: egor-tensin/setup-gcc@v1
with:
version: latest
platform: "${{ matrix.platform }}"
# 构建 (linux)
- name: Make dylib at ${{ matrix.os }} / ${{ matrix.platform }}
run: |
make dylib
env:
MTFMT_BUILD_C_DEFS: "-D_MSTR_BUILD_DYLIB=1 -D_MSTR_USE_MALLOC=1 -D_MSTR_USE_HARDWARE_DIV=1"
MTFMT_BUILD_USE_LTO: "1"
MTFMT_BUILD_TARGET_NAME: "mtfmt_${{ matrix.platform }}"
# 打包
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: dylib-artifact
path: target/*
build-dylib-win:
strategy:
fail-fast: true
matrix:
platform: [x86, x64]
os: [windows-latest]
runs-on: "${{ matrix.os }}"
name: "Build dll: ${{ matrix.os }} / ${{ matrix.platform }}"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Install Cygwin
uses: egor-tensin/setup-cygwin@v4
with:
packages: make gcc-g++
- name: Make dll at ${{ matrix.os }} / ${{ matrix.platform }}
run: |
make dylib
env:
MTFMT_BUILD_C_DEFS: "-D_MSTR_BUILD_DLL=1 -D_MSTR_USE_MALLOC=1 -D_MSTR_USE_HARDWARE_DIV=1 -D_MSTR_USE_STD_IO=1"
MTFMT_BUILD_USE_LTO: "1"
MTFMT_BUILD_INC_ADDITIONAL_OUT: "1"
MTFMT_BUILD_TARGET_NAME: "mtfmt_win_${{ matrix.platform }}"
MTFMT_BUILD_LIB_EXT: ".lib"
MTFMT_BUILD_DYLIB_EXT: ".dll"
# 打包
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: dll-artifact
path: target/*