diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bb6eb182..9975585d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -364,30 +364,7 @@ jobs: run: | export PATH=/c/hostedtoolcache/windows/go/${{ matrix.go-version }}/x64/bin/:$PATH cd /c/${{ github.repository }} - go get -v github.com/akiyosi/qt - 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 install -v -tags=no_env github.com/akiyosi/qt/cmd/... - go mod vendor - git clone https://github.com/akiyosi/env_windows_amd64_513.git vendor/github.com/akiyosi/env_windows_amd64_513 - - - uses: actions/cache@v2 - id: cache-qt-bindings-windows-build - with: - path: | - /c/${{ github.repository }}\vendor\github.com\akiyosi\qt\* - !/c/${{ github.repository }}\vendor\github.com\akiyosi\qt\.git - key: cache-qtbindings-windows-build-${{ env.cache-version }} - - - name: Generate Qt bindings - if: ${{ steps.cache-qt-bindings-windows-build.outputs.cache-hit != 'true' }} - shell: msys2 {0} - run: | - export PATH=/c/hostedtoolcache/windows/go/${{ matrix.go-version }}/x64/bin/:$PATH - cd /c/${{ github.repository }} - $(go env GOPATH)/bin/qtsetup -test=false + make qt_bindings - name: Get dependencies shell: msys2 {0} @@ -416,7 +393,7 @@ jobs: run: | cd /c/${{ github.repository }}/cmd/goneovim/deploy mv windows goneovim-windows - zip goneovim-windows -r goneovim-windows + zip -r goneovim-windows.zip goneovim-windows - name: Upload for windows uses: actions/upload-artifact@v1 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3ecf7963..7350b21c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -29,6 +29,10 @@ jobs: -a 0 -lt $(git log --oneline --show-pulls --since "yesterday" -- . ":!.github" ":!.gitignore" ":!.golangci.yml" | wc -l) \) -o \( "${{github.event_name}}" != "schedule" \) +################################################################# +# Linux +################################################################# + linux: needs: [check-new-commit] strategy: @@ -43,7 +47,7 @@ jobs: QT_VERSION: ${{ matrix.qtversion }} QT_API: 5.13.0 QT_DEBUG: false - GO111MODULE: off + GO111MODULE: on QT_STATIC: true QT_QMAKE_DIR: ${{ github.workspace }}/Qt/${{ matrix.qtversion }}/gcc_64/bin steps: @@ -54,7 +58,6 @@ jobs: sudo apt-get -y install build-essential libglu1-mesa-dev libpulse-dev libglib2.0-dev cmake sudo apt-get --no-install-recommends -qq -y install fontconfig libasound2 libegl1-mesa libnss3 libpci3 libxcomposite1 libxcursor1 libxi6 libxrandr2 libxtst6 sudo apt-get --no-install-recommends -qq -y install libdbus-1-dev libssl-dev libzstd-dev - #sudo apt-get --no-install-recommends -qq -y install libfontconfig1-dev libfreetype6-dev libx11-dev libx11-xcb-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev libxcb-xinerama0-dev libxkbcommon-dev libxkbcommon-x11-dev sudo apt-get install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev sudo apt-get install libwayland-dev libwayland-egl++ wayland-scanner++ @@ -69,7 +72,7 @@ jobs: path: ${{ github.workspace }}/Qt/${{ matrix.qtversion }}/gcc_64 key: ${{ matrix.qtversion }}-qt-linux-${{ env.cache-version }} - - name: Build Qt and deploy + - name: Build Qt if: ${{ steps.cache-qt-linux.outputs.cache-hit != 'true' }} run: | curl -L -o qt-everywhere-opensource-src-${{ matrix.qtversion }}.tar.xz https://download.qt.io/official_releases/qt/5.15/${{ matrix.qtversion }}/single/qt-everywhere-opensource-src-${{ matrix.qtversion }}.tar.xz @@ -86,9 +89,6 @@ jobs: CMAKE_PREFIX_PATH: ${{ github.workspace }}/Qt/${{ matrix.qtversion }}/gcc_64/lib/cmake Qt5_DIR: ${{ github.workspace }}/Qt/${{ matrix.qtversion }}/gcc_64/lib/cmake/Qt5 run: | - ls -l $CMAKE_PREFIX_PATH - ls -l $Qt5_DIR - ls -l $QT_QMAKE_DIR git clone -q --depth 1 https://github.com/fcitx/fcitx-qt5.git echo -e "ADD_DEFINITIONS(-DQT_STATICPLUGIN)\n$(cat $FILE)" > $FILE echo -e "find_package(Qt5 REQUIRED COMPONENTS Core Gui DBus)\n$(cat $FILE)" > $FILE @@ -101,10 +101,6 @@ jobs: cp -p ${{ github.workspace }}/fcitx-qt5/qt5/platforminputcontext/libfcitxplatforminputcontextplugin.a ${{ github.workspace }}/Qt/${{ matrix.qtversion }}/gcc_64/plugins/platforminputcontexts/ rm -fr ${{ github.workspace }}/fcitx-qt5 - - name: Get Qt binding for Go - run: | - go get -v github.com/akiyosi/qt/cmd/... - - name: Checkout code uses: actions/checkout@v2 with: @@ -118,23 +114,17 @@ jobs: sudo apt clean sudo rm -rf /usr/share/dotnet - # - uses: actions/cache@v2 - # id: cache-qt-bindings-linux - # with: - # path: ${{ github.workspace }}/src/github.com/akiyosi/qt/* - # key: ${{ matrix.qtversion }}-qtbindings-linux-${{ env.cache-version }} - - - name: Generate Qt bindings + - name: Get Qt binding for Go env: Qt5_DIR: ${{ github.workspace }}/Qt/${{ matrix.qtversion }}/gcc_64/lib/cmake/Qt5 - run: $(go env GOPATH)/bin/qtsetup -test=false + run: | + cd ${{ github.workspace }}/src/github.com/${{ github.repository }} + make qt_bindings - name: Get dependencies run: | cd ${{ github.workspace }}/src/github.com/${{ github.repository }} - go generate - go get -v -t -d github.com/${{ github.repository }}/... - $(go env GOPATH)/bin/qtmoc desktop ./cmd/goneovim + make deps - name: Retrieve version id: version-linux @@ -144,10 +134,8 @@ jobs: - name: Build run: | - cd ${{ github.workspace }}/src/github.com/${{ github.repository }}/ - go generate - $(go env GOPATH)/bin/qtdeploy build desktop ./cmd/goneovim - cp -pR runtime ./cmd/goneovim/deploy/linux/ + cd ${{ github.workspace }}/src/github.com/${{ github.repository }} + make app - if: github.event_name == 'workflow_dispatch' run: echo "ARCHIVE_NAME=goneovim-linux" >> $GITHUB_ENV @@ -162,167 +150,116 @@ jobs: mv linux "$ARCHIVE_NAME" tar -jcvf "$ARCHIVE_NAME".tar.bz2 "$ARCHIVE_NAME" - - name: Upload + - name: Upload for linux uses: actions/upload-artifact@v1 with: name: goneovim-linux path: ${{ github.workspace }}/src/github.com/${{ github.repository }}/cmd/goneovim/deploy/${{ env.ARCHIVE_NAME }}.tar.bz2 - windows: + +################################################################# +# MacOS +################################################################# + + macos: needs: [check-new-commit] strategy: matrix: - go-version: [1.21.0] - platform: [windows-latest] - qtversion: [5.14.1] + go-version: [1.21.x] + platform: [macos-latest] runs-on: ${{ matrix.platform }} env: - GOPATH: C:\ - GOROOT: C:\go-root - QT_VERSION: ${{ matrix.qtversion }} - # QT_DIR: ${{ github.workspace }}\Qt + GOPATH: ${{ github.workspace }} + QT_HOMEBREW: true QT_API: 5.13.0 - QT_MSYS2: true - QT_MSYS2_DIR: D:\a\_temp\msys64\ - QT_MSYS2_STATIC: true - QT_MSVC: false QT_DEBUG: false - # QT_DEBUG_CONSOLE: true - GO111MODULE: off - CGO_CFLAGS_ALLOW: ".*" - CGO_CXXFLAGS_ALLOW: ".*" - CGO_LDFLAGS_ALLOW: ".*" - # CGO_ENABLED: 1 - ACTIONS_ALLOW_UNSECURE_COMMANDS: true + GO111MODULE: on + QMAKE_APPLE_DEVICE_ARCHS: arm64 + # SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk steps: - name: Install Go - continue-on-error: true - run: | - curl -sL --retry 10 --retry-delay 60 -O https://dl.google.com/go/go${{ matrix.go-version }}.windows-amd64.zip - expand-archive -path go${{ matrix.go-version }}.windows-amd64.zip -destinationpath . - Move-Item -Path go -Destination C:\go-root - - - name: Setup MSYS2 and install Qt5 - uses: msys2/setup-msys2@v2 + uses: actions/setup-go@v4 with: - update: true - msystem: mingw64 - install: mingw-w64-x86_64-toolchain - - shell: msys2 {0} - run: | - pacman --noconfirm -S sed git 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://github.com/akiyosi/github-actions-playground/releases/download/qt5-patched-qtbug-71737/qt-5.15.5_patched-qtbug71737.zip - unzip qt-5.15.5_patched-qtbug71737.zip - cp -fpR qt5/* /mingw64/qt5-static/ - rm -fr qt5 - rm qt-5.15.5_patched-qtbug71737.zip + go-version: ${{ matrix.go-version }} - - name: Get Qt binding for Go + - name: Install Qt for macOS run: | - C:\go-root\bin\go.exe get -v -tags=no_env github.com/akiyosi/qt/cmd/... + brew install qt@5 - name: Checkout code uses: actions/checkout@v2 with: fetch-depth: 0 - path: .\src\github.com\akiyosi\goneovim - - - name: Copy checkout repogitory - shell: msys2 {0} - run: | - mkdir -p /c/src/github.com/akiyosi - cp -pR /d/a/goneovim/goneovim/src/github.com/akiyosi/goneovim /c/src/github.com/akiyosi/goneovim - - - name: Retrieve version - id: version-windows - run: | - cd C:\src\github.com\akiyosi\goneovim - echo "::set-output name=GONEOVIM_VERSION::$(git describe --tags)" - - - name: test version - run: | - echo ${{ steps.version-windows.outputs.GONEOVIM_VERSION }} - - - uses: actions/cache@v2 - id: cache-qt-bindings-windows - with: - path: | - C:\src\github.com\akiyosi\qt\* - !C:\src\github.com\akiyosi\qt\.git - key: ${{ matrix.qtversion }}-qtbindings-windows-${{ env.cache-version }} + path: ./src/github.com/${{ github.repository }} - - name: Generate Qt bindings - if: ${{ steps.cache-qt-bindings-windows.outputs.cache-hit != 'true' }} - shell: msys2 {0} + - name: Get Qt binding for Go run: | - export PATH=$PATH:/c/bin:/c/go-root/bin:/d/a/_temp/msys64/usr/bin - cp /c/bin/* /d/a/_temp/msys64/usr/bin - cp /c/go-root/bin/go /d/a/_temp/msys64/usr/bin - /c/bin/qtsetup -test=false + cd ${{ github.workspace }}/src/github.com/${{ github.repository }} + make qt_bindings - name: Get dependencies run: | - cd C:\src\github.com\akiyosi\goneovim - go generate - go get -v -d github.com/${{ github.repository }}/... + cd ${{ github.workspace }}/src/github.com/${{ github.repository }} + make deps - - name: Generate moc - shell: msys2 {0} + - name: Retrieve version + id: version-macos run: | - export PATH=$PATH:/c/bin:/c/go-root/bin:/d/a/_temp/msys64/usr/bin - cd /c/src/github.com/akiyosi/goneovim/ - /c/bin/qtmoc desktop ./cmd/goneovim + 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 windows - shell: msys2 {0} + - name: Build run: | - export PATH=$PATH:/c/bin:/c/go-root/bin:/d/a/_temp/msys64/usr/bin - cd /c/src/github.com/akiyosi/goneovim/ - /c/bin/qtdeploy build desktop ./cmd/goneovim - cp -pR runtime ./cmd/goneovim/deploy/windows/ + cd ${{ github.workspace }}/src/github.com/${{ github.repository }} + make app - if: github.event_name == 'workflow_dispatch' - run: echo "ARCHIVE_NAME=goneovim-windows" >> $env:GITHUB_ENV + run: echo "ARCHIVE_NAME=goneovim-macos" >> $GITHUB_ENV - if: github.event_name == 'schedule' - run: echo "ARCHIVE_NAME=goneovim-windows" >> $env:GITHUB_ENV + run: echo "ARCHIVE_NAME=goneovim-macos" >> $GITHUB_ENV - if: github.event_name == 'push' - run: echo "ARCHIVE_NAME=goneovim-${{ steps.version-windows.outputs.GONEOVIM_VERSION }}-windows" >> $env:GITHUB_ENV + run: echo "ARCHIVE_NAME=goneovim-${{ steps.version-macos.outputs.GONEOVIM_VERSION }}-macos" >> $GITHUB_ENV - name: Archive - shell: msys2 {0} run: | - cd /c/src/github.com/akiyosi/goneovim/cmd/goneovim/deploy - mv windows ${{ env.ARCHIVE_NAME }} - zip -r ${{ env.ARCHIVE_NAME }}.zip ${{ env.ARCHIVE_NAME }} + cd ${{ github.workspace }}/src/github.com/${{ github.repository }}/cmd/goneovim/deploy + mv darwin "$ARCHIVE_NAME" + tar -jcvf "$ARCHIVE_NAME".tar.bz2 "$ARCHIVE_NAME" - - name: Upload + - name: Upload for macos uses: actions/upload-artifact@v1 with: - name: goneovim-windows - path: C:/src/github.com/akiyosi/goneovim/cmd/goneovim/deploy/${{ env.ARCHIVE_NAME }}.zip + name: goneovim-macos + path: ${{ github.workspace }}/src/github.com/${{ github.repository }}/cmd/goneovim/deploy/${{ env.ARCHIVE_NAME }}.tar.bz2 - macos: +################################################################# +# Windows +################################################################# + + windows: needs: [check-new-commit] strategy: matrix: - go-version: [1.21.x] - platform: [macos-latest] + go-version: [1.21.0] + platform: [windows-latest] runs-on: ${{ matrix.platform }} env: - GOPATH: ${{ github.workspace }} - QT_HOMEBREW: true + 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: false - GO111MODULE: off - QMAKE_APPLE_DEVICE_ARCHS: arm64 - # SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk + QT_DEBUG_CONSOLE: false + GO111MODULE: on + CGO_CFLAGS_ALLOW: ".*" + CGO_CXXFLAGS_ALLOW: ".*" + CGO_LDFLAGS_ALLOW: ".*" + # CGO_ENABLED: 1 + ACTIONS_ALLOW_UNSECURE_COMMANDS: true steps: - name: Install Go @@ -330,146 +267,157 @@ jobs: with: go-version: ${{ matrix.go-version }} - - name: Install Qt for macOS + - 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: | - brew install qt@5 + 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: Get Qt binding for Go - run: | - go get -v github.com/akiyosi/qt/cmd/... + # - name: Patch qt5 + # shell: msys2 {0} + # run: | + # curl -sL --retry 10 --retry-delay 60 -O https://github.com/akiyosi/github-actions-playground/releases/download/qt5-patched-qtbug-71737/qt-5.15.5_patched-qtbug71737.zip + # unzip qt-5.15.5_patched-qtbug71737.zip + # cp -fpR qt5/* /mingw64/qt5-static/ + # rm -fr qt5 + # rm qt-5.15.5_patched-qtbug71737.zip - name: Checkout code uses: actions/checkout@v2 with: fetch-depth: 0 - path: ./src/github.com/${{ github.repository }} + path: ${{ github.workspace }}\${{ github.repository }} - - name: Retrieve version - id: version-macos + - name: Copy checkout repogitory + shell: msys2 {0} 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)" + 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: test version + - name: Get Qt binding for Go + shell: msys2 {0} run: | - echo ${{ steps.version-macos.outputs.GONEOVIM_VERSION }} - - # - uses: actions/cache@v2 - # id: cache-qt-bindings-macos - # with: - # path: ${{ github.workspace }}/src/github.com/akiyosi/qt/* - # key: ${{ matrix.qtversion }}-qtbindings-macos-${{ env.cache-version }} - - #if: ${{ steps.cache-qt-bindings-macos.outputs.cache-hit != 'true' }} - - - name: Generate Qt bindings - continue-on-error: true - run: $(go env GOPATH)/bin/qtsetup -test=false + 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: | - cd ${{ github.workspace }}/src/github.com/${{ github.repository }} - go generate - go get -v -t -d github.com/${{ github.repository }}/... - $(go env GOPATH)/bin/qtmoc desktop ./cmd/goneovim + export PATH=/c/hostedtoolcache/windows/go/${{ matrix.go-version }}/x64/bin/:$PATH + cd /c/${{ github.repository }} + make deps - - name: Build + - name: Retrieve version + id: version-windows run: | - cd ${{ github.workspace }}/src/github.com/${{ github.repository }}/ - go generate - $(go env GOPATH)/bin/qtdeploy build desktop ./cmd/goneovim - cp -pR runtime ./cmd/goneovim/deploy/darwin/goneovim.app/Contents/Resources/ - cd ${{ github.workspace }}/src/github.com/${{ github.repository }}/ - /usr/libexec/PlistBuddy -c "Add :CFBundleVersion string ${{ steps.version-macos.outputs.GONEOVIM_VERSION_HASH }}" "./cmd/goneovim/deploy/darwin/goneovim.app/Contents/Info.plist" - /usr/libexec/PlistBuddy -c "Add :CFBundleShortVersionString string ${{ steps.version-macos.outputs.GONEOVIM_VERSION }}" "./cmd/goneovim/deploy/darwin/goneovim.app/Contents/Info.plist" - cd ${{ github.workspace }}/src/github.com/${{ github.repository }}/cmd/goneovim/deploy/darwin/goneovim.app/Contents/Frameworks/ - rm -fr QtQuick.framework - rm -fr QtVirtualKeyboard.framework + cd C:\${{ github.repository }} + echo "::set-output name=GONEOVIM_VERSION::$(git describe --tags)" + + - name: Build for windows + shell: msys2 {0} + run: | + export PATH=/c/hostedtoolcache/windows/go/${{ matrix.go-version }}/x64/bin/:$PATH + cd /c/${{ github.repository }} + make app - if: github.event_name == 'workflow_dispatch' - run: echo "ARCHIVE_NAME=goneovim-macos" >> $GITHUB_ENV + run: echo "ARCHIVE_NAME=goneovim-windows" >> $env:GITHUB_ENV - if: github.event_name == 'schedule' - run: echo "ARCHIVE_NAME=goneovim-macos" >> $GITHUB_ENV + run: echo "ARCHIVE_NAME=goneovim-windows" >> $env:GITHUB_ENV - if: github.event_name == 'push' - run: echo "ARCHIVE_NAME=goneovim-${{ steps.version-macos.outputs.GONEOVIM_VERSION }}-macos" >> $GITHUB_ENV + run: echo "ARCHIVE_NAME=goneovim-${{ steps.version-windows.outputs.GONEOVIM_VERSION }}-windows" >> $env:GITHUB_ENV - name: Archive + shell: msys2 {0} run: | - cd ${{ github.workspace }}/src/github.com/${{ github.repository }}/cmd/goneovim/deploy - mv darwin "$ARCHIVE_NAME" - tar -jcvf "$ARCHIVE_NAME".tar.bz2 "$ARCHIVE_NAME" + cd /c/${{ github.repository }}/cmd/goneovim/deploy + mv windows ${{ env.ARCHIVE_NAME }} + zip -r ${{ env.ARCHIVE_NAME }}.zip ${{ env.ARCHIVE_NAME }} - name: Upload uses: actions/upload-artifact@v1 with: - 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-latest] - # runs-on: ${{ matrix.platform }} - # steps: - # - name: Checkout code - # uses: actions/checkout@v3 - # with: - # fetch-depth: 0 - # - # - name: Retrieve version - # id: version-freebsd - # run: | - # 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 + name: goneovim-windows + path: C:/${{ github.repository }}/cmd/goneovim/deploy/${{ env.ARCHIVE_NAME }}.zip + + +# freebsd: +# needs: [check-new-commit] +# strategy: +# matrix: +# go-version: [1.21.x] +# platform: [macos-latest] +# runs-on: ${{ matrix.platform }} +# steps: +# - name: Checkout code +# uses: actions/checkout@v3 +# with: +# fetch-depth: 0 +# +# - name: Retrieve version +# id: version-freebsd +# run: | +# 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: diff --git a/Makefile b/Makefile index 9d23e6c2..68af7cdf 100644 --- a/Makefile +++ b/Makefile @@ -55,47 +55,14 @@ endif qt_bindings: ## Setup Qt bindings for Go. -ifeq ($(OSNAME),Darwin) - @go get -v github.com/akiyosi/qt && \ + @go get -v github.com/akiyosi/qt@v0.0.0-20230719061055-7747cdc680f3 && \ go get github.com/akiyosi/qt/internal/cmd@v0.0.0-20230719061055-7747cdc680f3 && \ 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-20230719061055-7747cdc680f3 && \ go install -v -tags=no_env github.com/akiyosi/qt/cmd/... && \ go mod vendor && \ - git clone https://github.com/akiyosi/env_darwin_amd64_513.git vendor/github.com/akiyosi/env_darwin_amd64_513 - $(GOQTSETUP) -test=false -else ifeq ($(OSNAME),Linux) - @go get github.com/akiyosi/qt/internal/cmd@v0.0.0-20230719061055-7747cdc680f3 && \ - 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-20230719061055-7747cdc680f3 && \ - 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),FreeBSD) - @go get github.com/akiyosi/qt/internal/cmd@v0.0.0-20230719061055-7747cdc680f3 && \ - 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-20230719061055-7747cdc680f3 && \ - 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-20230719061055-7747cdc680f3 && \ - go.exe get github.com/akiyosi/qt/internal/binding/files/docs/5.12.0 && \ - go.exe get github.com/akiyosi/qt/internal/binding/files/docs/5.13.0 && \ - go.exe get github.com/akiyosi/qt/internal/cmd/moc@v0.0.0-20230719061055-7747cdc680f3 && \ - go.exe install -v -tags=no_env github.com/akiyosi/qt/cmd/... && \ - go.exe mod vendor && \ - git.exe clone https://github.com/akiyosi/env_windows_amd64_513.git vendor/github.com/akiyosi/env_windows_amd64_513 - $(GOQTSETUP) -test=false -endif deps: ## Get dependent libraries. @go get github.com/akiyosi/goneovim