Skip to content

fix: 针对新版 TinTin++ 的适应性修改 #67

fix: 针对新版 TinTin++ 的适应性修改

fix: 针对新版 TinTin++ 的适应性修改 #67

Workflow file for this run

name: Windows build and publish
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
push:
branches: [ "chore/windows" ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
pull_request:
branches: [ "master" ]
env:
# Use docker.io for Docker Hub if empty
REGISTRY: docker.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: windows-2019
steps:
- name: Set up Cygwin
uses: egor-tensin/setup-cygwin@v4
with:
packages: make gcc-g++ zlib-devel
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Check out code
uses: actions/checkout@v1
with:
submodules: true
- name: Install PCRE
shell: C:\tools\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
run: |
cd $(cygpath $GITHUB_WORKSPACE)
curl -sL https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.bz2/download | tar jxvf -
(cd pcre-8.45 && ./configure LDFLAGS=-static prefix=$(pwd)/usr && make && make install)
- name: Compile
shell: C:\tools\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
env:
CFLAGS: -I../../pcre-8.45/usr/include
CPPFLAGS: -I../../pcre-8.45/usr/include
LDFLAGS: -static -L../../pcre-8.45/usr/lib
run: |
cd $(cygpath $GITHUB_WORKSPACE)
(cd tintin/src && ./configure && make && strip tt++ || cat config.log)
- name: Check TinTin++
shell: C:\tools\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
run: |
cd $(cygpath $GITHUB_WORKSPACE)
ls -lh tintin/src/tt++
file tintin/src/tt++
ldd tintin/src/tt++
tintin/src/tt++ -V || true
- name: Packaging
shell: C:\tools\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
run: |
cd $(cygpath $GITHUB_WORKSPACE)
cp tintin/src/tt++.exe bin/
cp /bin/cygwin1.dll bin/
rm -rf .git
rm -rf .github
rm -rf tintin
rm -rf pcre-8.45
- name: Create artifact -- WinTin++
uses: actions/upload-artifact@v3
with:
name: WinTin++
path: |
${{ github.workspace }}/bin/tt++.exe
${{ github.workspace }}/bin/cygwin1.dll
- name: Create artifact -- PaoTin++
uses: actions/upload-artifact@v3
with:
name: PaoTin++ for Windows
path: |
${{ github.workspace }}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
${{ github.workspace }}/tintin/src/tt++.exe
${{ github.workspace }}/README.md