"CC" => "msvc",
"CXX" => "msvc",
],
+ "mingw" => [ // dummy
+ "ver" => "cur",
+ "CC" => "mingw",
+ "CXX" => "mingw",
+ ]
];
const ENV = [
"ubuntu-20.04" => [
]
]
],
- "windows-2019" => [
- 'env.CC_VND' => [
- "msvc" => [
- 'env.CC_VER' => [
- "cur" => "2019",
- ],
- ],
- ],
- ],
]
];
run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} -j2 --target test
- name: Install
if: env.BUILD_TESTING == 'ON'
- run: cmake --install build --config ${{ env.CMAKE_BUILD_TYPE }} -j2 --prefix /tmp
+ run: cmake --install build --config ${{ env.CMAKE_BUILD_TYPE }} --prefix /tmp
- name: Failed tests log
if: ${{ env.BUILD_TESTING == 'ON' && failure() }}
run: cat build/Testing/Temporary/LastTest.log || true
--data-urlencode "level=info" \
--data-urlencode "message=Github [${GITHUB_REPOSITORY}](https://github.com/${GITHUB_REPOSITORY}/commits/${REF}) (${REF}) [success](https://github.com/m6w6/libmemcached/actions/runs/${GITHUB_RUN_ID}) (${ImageOS}/${CC:-${CC_VND}-${CC_VER}})"
- name: Notify Gitter (failure)
- if: ${{ failure() && runner.os!='Windows'}}
+ if: ${{ failure() && runner.os != 'Windows'}}
run: |
REF=$(basename ${GITHUB_REF})
curl -sS "${{ secrets.GITTER }}" \
return "$os_ver, $cc_vnd, $cc_ver";
}
-function env_override($os_vnd) {
+function env_override($os_vnd, $cc_vnd = null) {
+ isset($cc_vnd) or $cc_vnd = DEF[DEF[$os_vnd]];
?>
OS_VND: <?=$os_vnd?> #
OS_VER: <?=DEF[$os_vnd]?> #
- CC_VND: <?=DEF[DEF[$os_vnd]]?> #
- CC_VER: <?=DEF[DEF[DEF[$os_vnd]]]["ver"]?> #
+ CC_VND: <?=$cc_vnd?> #
+ CC_VER: <?=DEF[$cc_vnd]["ver"]?> #
<?php
}
fetch-depth: 0
<?php steps(false); ?>
- # win build
+ # win msvc build
win-msvc:
name: win-msvc (<?=DEF["Windows"]?>, <?=DEF[DEF["Windows"]]?>, <?=DEF[DEF[DEF["Windows"]]]["ver"]?>)
runs-on: <?=DEF["Windows"]?> #
CMAKE_BUILD_TYPE: "Release"
BISON_ROOT: "C:/msys64/usr"
FLEX_ROOT: "C:/msys64/usr"
-<?php env_override("Windows")?>
+<?php env_override("Windows", "msvc")?>
continue-on-error: true
steps:
- uses: actions/checkout@v2
openssh
<?php steps(false);?>
+ # win mingw build (set PATH=%PATH%;c:\msys64\mingw64\bin)
+ win-mingw:
+ name: win-mingw (<?=DEF["Windows"]?>, mingw, <?=DEF["mingw"]["ver"]?>)
+ runs-on: <?=DEF["Windows"]?> #
+ env:
+ CMAKE_BUILD_TYPE: "Release"
+ CMAKE_GENERATOR: "MinGW Makefiles"
+ BISON_ROOT: "C:/msys64/usr"
+ FLEX_ROOT: "C:/msys64/usr"
+<?php env_override("Windows", "mingw")?>
+ continue-on-error: true
+ steps:
+ - uses: actions/checkout@v2
+ - uses: msys2/setup-msys2@v2
+ with:
+ release: false
+ path-type: inherit
+ install: >-
+ rsync
+ openssh
+ mingw-w64-x86_64-toolchain
+ git
+ - name: Prepare environment (for mingw on Windows)
+ run: |
+ echo "c:\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
+ echo "c:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
+<?php steps(false);?>
+
# linux release builds
release:
strategy: