Skip to content

Commit

Permalink
Fix windows CI
Browse files Browse the repository at this point in the history
  • Loading branch information
akiyosi committed Jul 19, 2024
1 parent 1e0606e commit da57a8a
Showing 1 changed file with 114 additions and 93 deletions.
207 changes: 114 additions & 93 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -406,115 +406,136 @@ jobs:
cd /d/a/goneovim/goneovim/src/github.com/${{ github.repository }}
make test
build-windows-mingw:
strategy:
matrix:
go-version: [1.21.0]
platform: [windows-latest]
runs-on: ${{ matrix.platform }}
env:
GOPATH: C:\
QT_API: 5.13.0
QT_MSYS2: true
QT_MSYS2_DIR: D:\a\_temp\msys64\
QT_MSYS2_STATIC: true
QT_MSVC: false
QT_DEBUG_CONSOLE: true
QT_DEBUG: false
GO111MODULE: on
CGO_CFLAGS_ALLOW: ".*"
CGO_CXXFLAGS_ALLOW: ".*"
CGO_LDFLAGS_ALLOW: ".*"
# CGO_ENABLED: 1
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:

- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}

- name: Setup MSYS2 and install Qt5
uses: msys2/setup-msys2@v2
with:
update: true
msystem: mingw64
install: mingw-w64-x86_64-toolchain
- shell: msys2 {0}
run: |
pacman --noconfirm -S sed git make unzip zip mingw-w64-x86_64-qt-creator mingw-w64-x86_64-qt5-static
pacman -Scc
pacman -Sc
# - name: Patch qt5
# shell: msys2 {0}
# run: |
# curl -sL --retry 10 --retry-delay 60 -O https:/akiyosi/github-actions-playground/releases/download/qt-5.15.8/qt-5.15.8.zip
# unzip qt-5.15.8.zip
# cp -fpR qt5/* /mingw64/qt5-static/
# rm -fr qt5
# rm qt-5.15.8.zip

- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
path: ${{ github.workspace }}\${{ github.repository }}

- name: Copy checkout repogitory
shell: msys2 {0}
run: |
mkdir -p /c/${{ github.repository }}
ls -l /d/a/goneovim/goneovim/${{ github.repository }}
cp -pR /d/a/goneovim/goneovim/${{ github.repository }}/* /c/${{ github.repository }}/
cp -pR /d/a/goneovim/goneovim/${{ github.repository }}/.* /c/${{ github.repository }}/
mkdir -p /c/src/github.com/${{ github.repository }}
cp -pR /d/a/goneovim/goneovim/${{ github.repository }}/* /c/src/github.com/${{ github.repository }}/
ls -l /c/${{ github.repository }}
ls -l /c/src/github.com/${{ github.repository }}
- name: Get Qt binding for Go
shell: msys2 {0}
run: |
export PATH=/c/hostedtoolcache/windows/go/${{ matrix.go-version }}/x64/bin/:$PATH
cd /c/${{ github.repository }}
make qt_bindings
- name: Get dependencies
shell: msys2 {0}
run: |
export PATH=/c/hostedtoolcache/windows/go/${{ matrix.go-version }}/x64/bin/:$PATH
cd /c/${{ github.repository }}
make deps
### https:/therecipe/qt/issues/657
#- name: Test
# shell: msys2 {0}
# run: |
# export PATH=/c/hostedtoolcache/windows/go/1.18.10/x64/bin/:$PATH
# cd /c/${{ github.repository }}
# make test

- name: Build
shell: msys2 {0}
run: |
export PATH=/c/hostedtoolcache/windows/go/${{ matrix.go-version }}/x64/bin/:$PATH
cd /c/${{ github.repository }}
export GOPATH=/d/a/goneovim/goneovim
cd /d/a/goneovim/goneovim/src/github.com/${{ github.repository }}
make app
- name: Archive
shell: msys2 {0}
run: |
cd /c/${{ github.repository }}/cmd/goneovim/deploy
cd /d/a/goneovim/goneovim/src/github.com/${{ github.repository }}/cmd/goneovim/deploy
mv windows goneovim-windows
zip -r goneovim-windows.zip goneovim-windows
- name: Upload for windows
uses: actions/upload-artifact@v1
with:
name: goneovim-windows
path: C:/${{ github.repository }}/cmd/goneovim/deploy/goneovim-windows.zip
path: D:/a/goneovim/goneovim/src/github.com/akiyosi/goneovim/cmd/goneovim/deploy/goneovim-windows.zip


# build-windows-mingw:
# strategy:
# matrix:
# go-version: [1.21.0]
# platform: [windows-latest]
# runs-on: ${{ matrix.platform }}
# env:
# GOPATH: C:\
# QT_API: 5.13.0
# QT_MSYS2: true
# QT_MSYS2_DIR: D:\a\_temp\msys64\
# QT_MSYS2_STATIC: true
# QT_MSVC: false
# QT_DEBUG_CONSOLE: true
# QT_DEBUG: false
# GO111MODULE: on
# CGO_CFLAGS_ALLOW: ".*"
# CGO_CXXFLAGS_ALLOW: ".*"
# CGO_LDFLAGS_ALLOW: ".*"
# # CGO_ENABLED: 1
# ACTIONS_ALLOW_UNSECURE_COMMANDS: true
# steps:

# - name: Install Go
# uses: actions/setup-go@v4
# with:
# go-version: ${{ matrix.go-version }}

# - name: Setup MSYS2 and install Qt5
# uses: msys2/setup-msys2@v2
# with:
# update: true
# msystem: mingw64
# install: mingw-w64-x86_64-toolchain
# - shell: msys2 {0}
# run: |
# pacman --noconfirm -S sed git make unzip zip mingw-w64-x86_64-qt-creator mingw-w64-x86_64-qt5-static
# pacman -Scc
# pacman -Sc

# # - name: Patch qt5
# # shell: msys2 {0}
# # run: |
# # curl -sL --retry 10 --retry-delay 60 -O https:/akiyosi/github-actions-playground/releases/download/qt-5.15.8/qt-5.15.8.zip
# # unzip qt-5.15.8.zip
# # cp -fpR qt5/* /mingw64/qt5-static/
# # rm -fr qt5
# # rm qt-5.15.8.zip

# - name: Checkout code
# uses: actions/checkout@v2
# with:
# fetch-depth: 0
# path: ${{ github.workspace }}\${{ github.repository }}
#
# - name: Copy checkout repogitory
# shell: msys2 {0}
# run: |
# mkdir -p /c/${{ github.repository }}
# ls -l /d/a/goneovim/goneovim/${{ github.repository }}
# cp -pR /d/a/goneovim/goneovim/${{ github.repository }}/* /c/${{ github.repository }}/
# cp -pR /d/a/goneovim/goneovim/${{ github.repository }}/.* /c/${{ github.repository }}/
# mkdir -p /c/src/github.com/${{ github.repository }}
# cp -pR /d/a/goneovim/goneovim/${{ github.repository }}/* /c/src/github.com/${{ github.repository }}/
# ls -l /c/${{ github.repository }}
# ls -l /c/src/github.com/${{ github.repository }}

# - name: Get Qt binding for Go
# shell: msys2 {0}
# run: |
# export PATH=/c/hostedtoolcache/windows/go/${{ matrix.go-version }}/x64/bin/:$PATH
# cd /c/${{ github.repository }}
# make qt_bindings

# - name: Get dependencies
# shell: msys2 {0}
# run: |
# export PATH=/c/hostedtoolcache/windows/go/${{ matrix.go-version }}/x64/bin/:$PATH
# cd /c/${{ github.repository }}
# make deps

# ### https:/therecipe/qt/issues/657
# #- name: Test
# # shell: msys2 {0}
# # run: |
# # export PATH=/c/hostedtoolcache/windows/go/1.18.10/x64/bin/:$PATH
# # cd /c/${{ github.repository }}
# # make test

# - name: Build
# shell: msys2 {0}
# run: |
# export PATH=/c/hostedtoolcache/windows/go/${{ matrix.go-version }}/x64/bin/:$PATH
# cd /c/${{ github.repository }}
# make app

# - name: Archive
# shell: msys2 {0}
# run: |
# cd /c/${{ github.repository }}/cmd/goneovim/deploy
# mv windows goneovim-windows
# zip -r goneovim-windows.zip goneovim-windows

# - name: Upload for windows
# uses: actions/upload-artifact@v1
# with:
# name: goneovim-windows
# path: C:/${{ github.repository }}/cmd/goneovim/deploy/goneovim-windows.zip



Expand Down

0 comments on commit da57a8a

Please sign in to comment.