Add ci for freebsd

This commit is contained in:
akiyosi 2023-09-01 06:49:02 +09:00
parent 7a010f04d4
commit 1ef21c442e
6 changed files with 376 additions and 225 deletions

View file

@ -425,230 +425,289 @@ jobs:
test-and-build-windows-msvc:
if: ${{ false }}
strategy:
matrix:
platform: [windows-latest]
qtversion: [5.14.1]
runs-on: ${{ matrix.platform }}
env:
GOPATH: ${{ github.workspace }}
GOROOT: ${{ github.workspace }}\go-root
GOROOT_BOOTSTRAP: ${{ github.workspace }}\go-boot
GOROOT_FINAL: ${{ github.workspace }}\go-boot
GOVSVARSPATH: ${{ github.workspace }}\BuildTools\VC\Auxiliary\Build\vcvars64.bat
MSVCDIR: 14.16.27023
VSBUILDTOOLS_URL: https://aka.ms/vs/15/release/vs_buildtools.exe
#VSBUILDTOOLS_URL: https://aka.ms/vs/17/release/vs_buildtools.exe
QTARCH: msvc2017_64
#QTARCH: msvc2019_64
QT_VERSION: ${{ matrix.qtversion }}
QT_DIR: C:\Qt
QT_MSVC: true
QT_DEBUG: false
GO111MODULE: off
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
#QT5BIN: qt5_static_binaries_win.zip
QT5BIN: qt5_shared_binaries_win.zip
# test-and-build-windows-msvc:
# if: ${{ false }}
# strategy:
# matrix:
# platform: [windows-latest]
# qtversion: [5.14.1]
# runs-on: ${{ matrix.platform }}
# env:
# GOPATH: ${{ github.workspace }}
# GOROOT: ${{ github.workspace }}\go-root
# GOROOT_BOOTSTRAP: ${{ github.workspace }}\go-boot
# GOROOT_FINAL: ${{ github.workspace }}\go-boot
# GOVSVARSPATH: ${{ github.workspace }}\BuildTools\VC\Auxiliary\Build\vcvars64.bat
# MSVCDIR: 14.16.27023
# VSBUILDTOOLS_URL: https://aka.ms/vs/15/release/vs_buildtools.exe
# #VSBUILDTOOLS_URL: https://aka.ms/vs/17/release/vs_buildtools.exe
# QTARCH: msvc2017_64
# #QTARCH: msvc2019_64
# QT_VERSION: ${{ matrix.qtversion }}
# QT_DIR: C:\Qt
# QT_MSVC: true
# QT_DEBUG: false
# GO111MODULE: off
# ACTIONS_ALLOW_UNSECURE_COMMANDS: true
# #QT5BIN: qt5_static_binaries_win.zip
# QT5BIN: qt5_shared_binaries_win.zip
# steps:
# - name: Install Qt
# uses: jurplel/install-qt-action@v3
# with:
# version: ${{ matrix.qtversion }}
# host: windows
# target: desktop
# modules: 'qtcharts qtdatavis3d qtpurchasing qtvirtualkeyboard qtnetworkauth qtwebglplugin qtscript'
# arch: 'win64_${{ env.QTARCH }}'
# install-deps: 'true'
# dir: C:\
# # mirror: 'http://mirrors.ocf.berkeley.edu/qt/'
# #- name: Check dir
# # continue-on-error: true
# # run: |
# # dir C:\Qt
# # dir C:\Qt\${{ matrix.qtversion }}
# # dir C:\Qt\${{ matrix.qtversion }}\${{ env.QTARCH }}
# - uses: actions/cache@v2
# id: cache-msvc-buildtools
# with:
# path: ${{ github.workspace }}\BuildTools
# key: ${{ matrix.qtversion }}-msvc-buildtools-${{ env.cache-version }}
# - name: Intall MSVC Visual C++ Buildtools
# if: ${{ steps.cache-msvc-buildtools.outputs.cache-hit != 'true' }}
# run: |
# curl -sL --retry 10 --retry-delay 60 -O ${{ env.VSBUILDTOOLS_URL }}
# New-Item -Path BuildTools -ItemType Directory
# .\vs_BuildTools.exe --quiet --wait --norestart --nocache --installPath ${{ github.workspace }}\BuildTools --add Microsoft.VisualStudio.Workload.VCTools --includeOptional
# Start-Sleep -s 660
# - name: Check MSVC Visual C++ Buildtools installation
# run: |
# dir ${{ github.workspace }}\
# dir ${{ github.workspace }}\BuildTools
# dir ${{ github.workspace }}\BuildTools\VC
# dir ${{ github.workspace }}\BuildTools\VC\Tools
# dir ${{ github.workspace }}\BuildTools\VC\Tools\MSVC
# dir ${{ github.workspace }}\BuildTools\VC\Tools\MSVC\${{ env.MSVCDIR }}
# dir ${{ github.workspace }}\BuildTools\VC\Tools\MSVC\${{ env.MSVCDIR }}\bin
# dir ${{ github.workspace }}\BuildTools\VC\Tools\MSVC\${{ env.MSVCDIR }}\bin\Hostx64
# dir ${{ github.workspace }}\BuildTools\VC\Tools\MSVC\${{ env.MSVCDIR }}\bin\Hostx64\x64
# - name: Replace qt5
# run: |
# mkdir C:\qt-dl
# cd C:\qt-dl
# curl -sL --retry 10 --retry-delay 60 -O -L https://github.com/akiyosi/github-actions-playground/releases/download/qt5-static-msvc/${{ env.QT5BIN }}
# 7z x ${{ env.QT5BIN }}
# del ${{ env.QT5BIN }}
# Remove-Item -Path C:\Qt\${{ matrix.qtversion }}\${{ env.QTARCH }} -Force -Recurse
# Copy-Item .\qt5-bin -destination C:\Qt\${{ matrix.qtversion }}\${{ env.QTARCH }} -recurse
# Remove-Item -Path C:\qt-dl\qt5-bin -Force -Recurse
# - name: Install Go 1.18 for "go get"
# run: |
# curl -sL --retry 10 --retry-delay 60 -O https://dl.google.com/go/go1.18.5.windows-amd64.zip
# expand-archive -path go1.18.5.windows-amd64.zip -destinationpath .
# Move-Item -Path go -Destination go-1.18
# - name: Get Qt binding for Go
# env:
# GOROOT: ${{ github.workspace }}\go-1.18
# run: |
# ${{ github.workspace }}\go-1.18\bin\go.exe get -v -tags=no_env github.com/akiyosi/qt/cmd/...
# - name: Install Go 1.13
# run: |
# curl -sL --retry 10 --retry-delay 60 -O https://dl.google.com/go/go1.13.4.windows-amd64.zip
# expand-archive -path go1.13.4.windows-amd64.zip -destinationpath .
# Move-Item -Path go -Destination go-root
# - name: Checkout code
# uses: actions/checkout@v2
# with:
# fetch-depth: 0
# path: ${{ env.GOPATH }}\src\github.com\${{ github.repository }}
# # FIXME: Should be fixed with the deprecation of set-env
# - name: Set PATH
# run: |
# $env:PATH = "${{ github.workspace }}\\go-root\\bin;$env:PATH"
# $env:PATH = "C:\\Qt\\${{ matrix.qtversion }}\\msvc2017_64\\bin;${{ github.workspace }}\\BuildTools\\VC\\Tools\\MSVC\\${{ env.MSVCDIR }}\\bin\\Hostx64\\x64;$env:PATH"
# echo "::set-env name=PATH::$env:PATH"
# - name: Enable experimental Go features Step.1
# continue-on-error: true
# run: |
# git clone https://github.com/golang/go.git ${{ github.workspace }}\go-msvc
# cd ${{ github.workspace }}\go-msvc
# git fetch "https://go.googlesource.com/go" refs/changes/46/133946/5
# Git checkout FETCH_HEAD
# echo "devel +6741b7009d" > VERSION
# - name: Enable experimental Go features Step.2
# continue-on-error: true
# run: |
# cd ${{ github.workspace }}\go-msvc
# curl -sL --retry 10 --retry-delay 60 https://github.com/golang/go/commit/e4535772ca3f11084ee5fa4d4bd3a542e143b80f.patch | patch -p1 -R
# - name: Enable experimental Go features Step.3
# continue-on-error: true
# run: |
# cd ${{ github.workspace }}\go-msvc
# curl -sL --retry 10 --retry-delay 60 https://github.com/golang/go/commit/f10815898c0732e2e6cdb697d6f95f33f8650b4e.patch | patch -p1 -R
# - name: Enable experimental Go features Step.4
# continue-on-error: true
# run: |
# cd ${{ github.workspace }}
# Move-Item -Path go-root -Destination go-boot
# Move-Item -Path go-msvc -Destination go-root
# cd ${{ github.workspace }}\go-root\src
# .\make.bat
# # - uses: actions/cache@v2
# # id: cache-qt-bindings-windows
# # with:
# # path: |
# # ${{ github.workspace }}\src\github.com\akiyosi\qt\*
# # !${{ github.workspace }}\src\github.com\akiyosi\qt\.git
# # key: ${{ matrix.qtversion }}-qtbindings-windows-${{ env.cache-version }}
# - name: Generate Qt bindings
# continue-on-error: true
# env:
# QT_API: 5.13.0
# shell: cmd
# run: |
# ${{ github.workspace }}\bin\qtsetup.exe prep windows
# ${{ github.workspace }}\bin\qtsetup.exe check windows
# ${{ github.workspace }}\bin\qtsetup.exe generate windows
# sed -i '9,14d' ${{ github.workspace }}\src\github.com\akiyosi\qt\core\core.cpp
# sed -i '661,666d' ${{ github.workspace }}\src\github.com\akiyosi\qt\internal\binding\templater\template_cpp.go
# ${{ github.workspace }}\bin\qtsetup.exe install windows
#
# - name: Get dependencies
# run: |
# go get -v -d github.com/${{ github.repository }}/...
# cd ${{ github.workspace }}\src\github.com\${{ github.repository }}
# ${{ github.workspace }}\bin\qtmoc.exe desktop ./cmd/goneovim
# # - name: Convert to compatible sources on Qt5.12
# # if: ${{ matrix.qtversion == '5.12.6' }}
# # run: |
# # cd ${{ github.workspace }}\src\github.com\${{ github.repository }}
# # $data=Get-Content .\editor\workspace.go | % { $_ -replace "NewQVariant31", "NewQVariant33" }
# # $data | Out-File .\editor\workspace.go -Encoding UTF8
# # $data=Get-Content .\editor\popupmenu.go | % { $_ -replace "AddWidget2", "AddWidget" }
# # $data | Out-File .\editor\popupmenu.go -Encoding UTF8
# # $data=Get-Content .\editor\message.go | % { $_ -replace "AddWidget2", "AddWidget" }
# # $data | Out-File .\editor\message.go -Encoding UTF8
# # $data=Get-Content .\editor\window.go | % { $_ -replace "DrawText6", "DrawText5" }
# # $data | Out-File .\editor\window.go -Encoding UTF8
# # $data=Get-Content .\editor\screen.go | % { $_ -replace "NewQVariant5", "NewQVariant2" }
# # $data | Out-File .\editor\screen.go -Encoding UTF8
# # $ch1="), text, gui.NewQTextOption2(core.Qt__AlignVCenter),"
# # $rep1="), int(core.Qt__AlignVCenter), text, nil,"
# # $data=Get-Content .\editor\window.go | % { $_ -replace [regex]::Escape($ch1), $rep1 }
# # $data | Out-File .\editor\window.go -Encoding UTF8
# # $data=Get-Content .\editor\cursor.go | % { $_ -replace "DrawText6", "DrawText5" }
# # $data | Out-File .\editor\cursor.go -Encoding UTF8
# # $data=Get-Content .\editor\cursor.go | % { $_ -replace "NewQVariant10", "NewQVariant12" }
# # $data | Out-File .\editor\cursor.go -Encoding UTF8
# # $ch2="), text, gui.NewQTextOption2(core.Qt__AlignVCenter),"
# # $rep2="), int(core.Qt__AlignVCenter), text, nil,"
# # $data=Get-Content .\editor\cursor.go | % { $_ -replace [regex]::Escape($ch2), $rep2 }
# # $data | Out-File .\editor\cursor.go -Encoding UTF8
# # $data=Get-Content .\util\utils.go | % { $_ -replace "SetOffset2", "SetOffset3" }
# # $data | Out-File .\util\utils.go -Encoding UTF8
# # - name: Test
# # env:
# # QT_API: 5.13.0
# # run: go test github.com\akiyosi\goneovim\editor
# - name: Retrieve version
# id: version-windows
# run: |
# cd ${{ github.workspace }}/src/github.com/${{ github.repository }}
# echo "::set-output name=GONEOVIM_VERSION::$(git describe --tags)"
# - name: Build
# env:
# QT_API: 5.13.0
# run: |
# cd ${{ github.workspace }}\src\github.com\${{ github.repository }}
# go generate
# ${{ github.workspace }}\bin\qtdeploy build desktop ./cmd/goneovim
# Copy-Item -Force -Recurse -Path ../../runtime -Destination ./deploy/windows/
# - name: Upload for windows
# uses: actions/upload-artifact@v1
# with:
# name: goneovim-windows-msvc
# path: ${{ github.workspace }}/src/github.com/${{ github.repository }}/cmd/goneovim/deploy/windows
############################################
# freebsd
############################################
test-and-build-freebsd:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qtversion }}
host: windows
target: desktop
modules: 'qtcharts qtdatavis3d qtpurchasing qtvirtualkeyboard qtnetworkauth qtwebglplugin qtscript'
arch: 'win64_${{ env.QTARCH }}'
install-deps: 'true'
dir: C:\
# mirror: 'http://mirrors.ocf.berkeley.edu/qt/'
- name: Build for freeBSD
uses: cross-platform-actions/action@v0.13.0
env:
GOPATH: /home/runner/go
QT_PKG_CONFIG: true
QT_API: 5.13.0
QT_DEBUG: false
QT_STATIC: true
GO111MODULE: on
GOPROXY: https://goproxy.io
CGO_CPPFLAGS: '-O3 -Wno-deprecated'
with:
environment_variables: GOPATH QT_PKG_CONFIG QT_API QT_DEBUG QT_STATIC GO111MODULE GOPROXY
operating_system: freebsd
architecture: x86_64
version: '13.2'
shell: bash
memory: 12G
cpu_count: 4
run: |
yes | sudo pkg install git go pkgconf
yes | sudo pkg install devel/qt5
yes | sudo pkg install gmake
gmake qt_bindings
gmake deps
gmake test
gmake app
#- name: Check dir
# continue-on-error: true
# run: |
# dir C:\Qt
# dir C:\Qt\${{ matrix.qtversion }}
# dir C:\Qt\${{ matrix.qtversion }}\${{ env.QTARCH }}
- name: check dir
run: |
pwd
ls -l cmd/goneovim/deploy/freebsd
- uses: actions/cache@v2
id: cache-msvc-buildtools
with:
path: ${{ github.workspace }}\BuildTools
key: ${{ matrix.qtversion }}-msvc-buildtools-${{ env.cache-version }}
- name: Intall MSVC Visual C++ Buildtools
if: ${{ steps.cache-msvc-buildtools.outputs.cache-hit != 'true' }}
run: |
curl -sL --retry 10 --retry-delay 60 -O ${{ env.VSBUILDTOOLS_URL }}
New-Item -Path BuildTools -ItemType Directory
.\vs_BuildTools.exe --quiet --wait --norestart --nocache --installPath ${{ github.workspace }}\BuildTools --add Microsoft.VisualStudio.Workload.VCTools --includeOptional
Start-Sleep -s 660
- name: Check MSVC Visual C++ Buildtools installation
run: |
dir ${{ github.workspace }}\
dir ${{ github.workspace }}\BuildTools
dir ${{ github.workspace }}\BuildTools\VC
dir ${{ github.workspace }}\BuildTools\VC\Tools
dir ${{ github.workspace }}\BuildTools\VC\Tools\MSVC
dir ${{ github.workspace }}\BuildTools\VC\Tools\MSVC\${{ env.MSVCDIR }}
dir ${{ github.workspace }}\BuildTools\VC\Tools\MSVC\${{ env.MSVCDIR }}\bin
dir ${{ github.workspace }}\BuildTools\VC\Tools\MSVC\${{ env.MSVCDIR }}\bin\Hostx64
dir ${{ github.workspace }}\BuildTools\VC\Tools\MSVC\${{ env.MSVCDIR }}\bin\Hostx64\x64
- name: Replace qt5
run: |
mkdir C:\qt-dl
cd C:\qt-dl
curl -sL --retry 10 --retry-delay 60 -O -L https://github.com/akiyosi/github-actions-playground/releases/download/qt5-static-msvc/${{ env.QT5BIN }}
7z x ${{ env.QT5BIN }}
del ${{ env.QT5BIN }}
Remove-Item -Path C:\Qt\${{ matrix.qtversion }}\${{ env.QTARCH }} -Force -Recurse
Copy-Item .\qt5-bin -destination C:\Qt\${{ matrix.qtversion }}\${{ env.QTARCH }} -recurse
Remove-Item -Path C:\qt-dl\qt5-bin -Force -Recurse
- name: Install Go 1.18 for "go get"
run: |
curl -sL --retry 10 --retry-delay 60 -O https://dl.google.com/go/go1.18.5.windows-amd64.zip
expand-archive -path go1.18.5.windows-amd64.zip -destinationpath .
Move-Item -Path go -Destination go-1.18
- name: Get Qt binding for Go
env:
GOROOT: ${{ github.workspace }}\go-1.18
run: |
${{ github.workspace }}\go-1.18\bin\go.exe get -v -tags=no_env github.com/akiyosi/qt/cmd/...
- name: Install Go 1.13
run: |
curl -sL --retry 10 --retry-delay 60 -O https://dl.google.com/go/go1.13.4.windows-amd64.zip
expand-archive -path go1.13.4.windows-amd64.zip -destinationpath .
Move-Item -Path go -Destination go-root
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
path: ${{ env.GOPATH }}\src\github.com\${{ github.repository }}
# FIXME: Should be fixed with the deprecation of set-env
- name: Set PATH
run: |
$env:PATH = "${{ github.workspace }}\\go-root\\bin;$env:PATH"
$env:PATH = "C:\\Qt\\${{ matrix.qtversion }}\\msvc2017_64\\bin;${{ github.workspace }}\\BuildTools\\VC\\Tools\\MSVC\\${{ env.MSVCDIR }}\\bin\\Hostx64\\x64;$env:PATH"
echo "::set-env name=PATH::$env:PATH"
- name: Enable experimental Go features Step.1
continue-on-error: true
run: |
git clone https://github.com/golang/go.git ${{ github.workspace }}\go-msvc
cd ${{ github.workspace }}\go-msvc
git fetch "https://go.googlesource.com/go" refs/changes/46/133946/5
Git checkout FETCH_HEAD
echo "devel +6741b7009d" > VERSION
- name: Enable experimental Go features Step.2
continue-on-error: true
run: |
cd ${{ github.workspace }}\go-msvc
curl -sL --retry 10 --retry-delay 60 https://github.com/golang/go/commit/e4535772ca3f11084ee5fa4d4bd3a542e143b80f.patch | patch -p1 -R
- name: Enable experimental Go features Step.3
continue-on-error: true
run: |
cd ${{ github.workspace }}\go-msvc
curl -sL --retry 10 --retry-delay 60 https://github.com/golang/go/commit/f10815898c0732e2e6cdb697d6f95f33f8650b4e.patch | patch -p1 -R
- name: Enable experimental Go features Step.4
continue-on-error: true
run: |
cd ${{ github.workspace }}
Move-Item -Path go-root -Destination go-boot
Move-Item -Path go-msvc -Destination go-root
cd ${{ github.workspace }}\go-root\src
.\make.bat
# - uses: actions/cache@v2
# id: cache-qt-bindings-windows
# with:
# path: |
# ${{ github.workspace }}\src\github.com\akiyosi\qt\*
# !${{ github.workspace }}\src\github.com\akiyosi\qt\.git
# key: ${{ matrix.qtversion }}-qtbindings-windows-${{ env.cache-version }}
- name: Generate Qt bindings
continue-on-error: true
env:
QT_API: 5.13.0
shell: cmd
run: |
${{ github.workspace }}\bin\qtsetup.exe prep windows
${{ github.workspace }}\bin\qtsetup.exe check windows
${{ github.workspace }}\bin\qtsetup.exe generate windows
sed -i '9,14d' ${{ github.workspace }}\src\github.com\akiyosi\qt\core\core.cpp
sed -i '661,666d' ${{ github.workspace }}\src\github.com\akiyosi\qt\internal\binding\templater\template_cpp.go
${{ github.workspace }}\bin\qtsetup.exe install windows
- name: Archive
run: |
cd cmd/goneovim/deploy
mv freebsd goneovim-freebsd
tar -jcvf goneovim-freebsd.tar.bz2 goneovim-freebsd
- name: Get dependencies
run: |
go get -v -d github.com/${{ github.repository }}/...
cd ${{ github.workspace }}\src\github.com\${{ github.repository }}
${{ github.workspace }}\bin\qtmoc.exe desktop ./cmd/goneovim
# - name: Convert to compatible sources on Qt5.12
# if: ${{ matrix.qtversion == '5.12.6' }}
# run: |
# cd ${{ github.workspace }}\src\github.com\${{ github.repository }}
# $data=Get-Content .\editor\workspace.go | % { $_ -replace "NewQVariant31", "NewQVariant33" }
# $data | Out-File .\editor\workspace.go -Encoding UTF8
# $data=Get-Content .\editor\popupmenu.go | % { $_ -replace "AddWidget2", "AddWidget" }
# $data | Out-File .\editor\popupmenu.go -Encoding UTF8
# $data=Get-Content .\editor\message.go | % { $_ -replace "AddWidget2", "AddWidget" }
# $data | Out-File .\editor\message.go -Encoding UTF8
# $data=Get-Content .\editor\window.go | % { $_ -replace "DrawText6", "DrawText5" }
# $data | Out-File .\editor\window.go -Encoding UTF8
# $data=Get-Content .\editor\screen.go | % { $_ -replace "NewQVariant5", "NewQVariant2" }
# $data | Out-File .\editor\screen.go -Encoding UTF8
# $ch1="), text, gui.NewQTextOption2(core.Qt__AlignVCenter),"
# $rep1="), int(core.Qt__AlignVCenter), text, nil,"
# $data=Get-Content .\editor\window.go | % { $_ -replace [regex]::Escape($ch1), $rep1 }
# $data | Out-File .\editor\window.go -Encoding UTF8
# $data=Get-Content .\editor\cursor.go | % { $_ -replace "DrawText6", "DrawText5" }
# $data | Out-File .\editor\cursor.go -Encoding UTF8
# $data=Get-Content .\editor\cursor.go | % { $_ -replace "NewQVariant10", "NewQVariant12" }
# $data | Out-File .\editor\cursor.go -Encoding UTF8
# $ch2="), text, gui.NewQTextOption2(core.Qt__AlignVCenter),"
# $rep2="), int(core.Qt__AlignVCenter), text, nil,"
# $data=Get-Content .\editor\cursor.go | % { $_ -replace [regex]::Escape($ch2), $rep2 }
# $data | Out-File .\editor\cursor.go -Encoding UTF8
# $data=Get-Content .\util\utils.go | % { $_ -replace "SetOffset2", "SetOffset3" }
# $data | Out-File .\util\utils.go -Encoding UTF8
# - name: Test
# env:
# QT_API: 5.13.0
# run: go test github.com\akiyosi\goneovim\editor
- name: Retrieve version
id: version-windows
run: |
cd ${{ github.workspace }}/src/github.com/${{ github.repository }}
echo "::set-output name=GONEOVIM_VERSION::$(git describe --tags)"
- name: Build
env:
QT_API: 5.13.0
run: |
cd ${{ github.workspace }}\src\github.com\${{ github.repository }}
go generate
${{ github.workspace }}\bin\qtdeploy build desktop ./cmd/goneovim
Copy-Item -Force -Recurse -Path ../../runtime -Destination ./deploy/windows/
- name: Upload for windows
uses: actions/upload-artifact@v1
with:
name: goneovim-windows-msvc
path: ${{ github.workspace }}/src/github.com/${{ github.repository }}/cmd/goneovim/deploy/windows
- name: Upload for freebsd
uses: actions/upload-artifact@v1
with:
name: goneovim-freebsd
path: ${{ github.workspace }}/cmd/goneovim/deploy/goneovim-freebsd.tar.bz2

View file

@ -416,8 +416,76 @@ jobs:
name: goneovim-macos
path: ${{ github.workspace }}/src/github.com/${{ github.repository }}/cmd/goneovim/deploy/${{ env.ARCHIVE_NAME }}.tar.bz2
freebsd:
needs: [check-new-commit]
strategy:
matrix:
go-version: [1.21.x]
platform: [macos-11]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
path: ./src/github.com/${{ github.repository }}
- name: Retrieve version
id: version-freebsd
run: |
cd ${{ github.workspace }}/src/github.com/${{ github.repository }}
echo "::set-output name=GONEOVIM_VERSION::$(git describe --tags)"
echo "::set-output name=GONEOVIM_VERSION_HASH::$(git rev-parse HEAD)"
- name: Build for freeBSD
uses: cross-platform-actions/action@v0.13.0
env:
GOPATH: /home/runner/go
QT_PKG_CONFIG: true
QT_API: 5.13.0
QT_DEBUG: false
QT_STATIC: true
GO111MODULE: on
GOPROXY: https://goproxy.io
CGO_CPPFLAGS: '-O3 -Wno-deprecated'
with:
environment_variables: GOPATH QT_PKG_CONFIG QT_API QT_DEBUG QT_STATIC GO111MODULE GOPROXY
operating_system: freebsd
architecture: x86_64
version: '13.2'
shell: bash
memory: 12G
cpu_count: 4
run: |
yes | sudo pkg install git go pkgconf
yes | sudo pkg install devel/qt5
yes | sudo pkg install gmake
gmake qt_bindings
gmake deps
gmake app
- if: github.event_name == 'workflow_dispatch'
run: echo "ARCHIVE_NAME=goneovim-freebsd" >> $GITHUB_ENV
- if: github.event_name == 'schedule'
run: echo "ARCHIVE_NAME=goneovim-freebsd" >> $GITHUB_ENV
- if: github.event_name == 'push'
run: echo "ARCHIVE_NAME=goneovim-${{ steps.version-freebsd.outputs.GONEOVIM_VERSION }}-freebsd" >> $GITHUB_ENV
- name: Archive
run: |
cd cmd/goneovim/deploy
mv freebsd "$ARCHIVE_NAME"
tar -jcvf "$ARCHIVE_NAME".tar.bz2 "$ARCHIVE_NAME"
- name: Upload
uses: actions/upload-artifact@v1
with:
name: goneovim-freebsd
path: ${{ github.workspace }}/cmd/goneovim/deploy/${{ env.ARCHIVE_NAME }}.tar.bz2
publish:
needs: [linux, windows, macos]
needs: [linux, windows, macos, freebsd]
runs-on: ubuntu-20.04
permissions:
contents: write
@ -461,6 +529,6 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create $TAG_NAME $PRERELEASE --title "$SUBJECT" --target $GITHUB_SHA /home/runner/work/goneovim/goneovim/goneovim-macos/* /home/runner/work/goneovim/goneovim/goneovim-linux/* /home/runner/work/goneovim/goneovim/goneovim-windows/*
gh release create $TAG_NAME $PRERELEASE --title "$SUBJECT" --target $GITHUB_SHA /home/runner/work/goneovim/goneovim/goneovim-macos/* /home/runner/work/goneovim/goneovim/goneovim-linux/* /home/runner/work/goneovim/goneovim/goneovim-windows/* /home/runner/work/goneovim/goneovim/goneovim-freebsd/*

View file

@ -5,6 +5,12 @@ See https://github.com/akiyosi/goneovim/blob/master/.github/workflows/ci.yaml
## For Linux, MacOS, Windows(MSYS2)
* Install Qt
- FreeBSD
- Install the Qt5 dev packages and export **QT_PKG_CONFIG=true**
```
pkg install devel/qt5
```
- Linux
- Install the Qt5 dev packages through your systems package manager and export **QT_PKG_CONFIG=true**. (You will need to install the `html/doc` packages containing the `*.index` files as well.)
@ -49,6 +55,7 @@ See https://github.com/akiyosi/goneovim/blob/master/.github/workflows/ci.yaml
* Setup Qt binding
NOTE: If you are using FreeBSD, you need to use gmake instead of make.
```
make qt_bindings

View file

@ -6,6 +6,7 @@ VERSION_HASH := $(shell git rev-parse HEAD)
DEPLOYMENT_WINDOWS:=cmd/goneovim/deploy/windows
DEPLOYMENT_DARWIN:=cmd/goneovim/deploy/darwin
DEPLOYMENT_LINUX:=cmd/goneovim/deploy/linux
DEPLOYMENT_FREEBSD:=cmd/goneovim/deploy/freebsd
# runtime directory
ifeq ($(OS),Windows_NT)
@ -17,6 +18,9 @@ OSNAME=Darwin
else ifeq ($(shell uname), Linux)
RUNTIME_DIR=$(DEPLOYMENT_LINUX)/
OSNAME=Linux
else ifeq ($(shell uname), FreeBSD)
RUNTIME_DIR=$(DEPLOYMENT_FREEBSD)/
OSNAME=FreeBSD
endif
# qt bindings cmd
@ -70,6 +74,16 @@ else ifeq ($(OSNAME),Linux)
go mod vendor && \
git clone https://github.com/akiyosi/env_linux_amd64_513.git vendor/github.com/akiyosi/env_linux_amd64_513
$(GOQTSETUP) -test=false
else ifeq ($(OSNAME),FreeBSD)
@go get github.com/akiyosi/qt/internal/cmd@v0.0.0-20230718095223-7e4e923f23fa && \
go get github.com/akiyosi/qt/internal/binding/files/docs/5.12.0 && \
go get github.com/akiyosi/qt/internal/binding/files/docs/5.13.0 && \
go get github.com/akiyosi/qt/internal/cmd/moc@v0.0.0-20230718095223-7e4e923f23fa && \
go get -v github.com/akiyosi/qt && \
go install -v -tags=no_env github.com/akiyosi/qt/cmd/... && \
go mod vendor && \
git clone https://github.com/akiyosi/env_linux_amd64_513.git vendor/github.com/akiyosi/env_linux_amd64_513
$(GOQTSETUP) -test=false
else ifeq ($(OSNAME),Windows)
@go.exe get -v github.com/akiyosi/qt && \
go.exe get github.com/akiyosi/qt/internal/cmd@v0.0.0-20230718095223-7e4e923f23fa && \

View file

@ -65,7 +65,7 @@ See [Installing Neovim](https://github.com/neovim/neovim/wiki/Installing-Neovim)
## Getting Started
Pre-built packages for Windows, MacOS, and Linux are found at the [Releases](https://github.com/akiyosi/goneovim/releases) page.
Pre-built packages for Windows, MacOS, Linux, and FreeBSD are found at the [Releases](https://github.com/akiyosi/goneovim/releases) page.
Or you can get the latest binary from Github Actions CI. See [Actions](https://github.com/akiyosi/goneovim/actions) page.

View file

@ -1,3 +1,6 @@
//go:build linux || freebsd
// +build linux freebsd
package editor
import (