Update Dependencies [workflow_dispatch][dev-0.4.0] rev.88de8d7809203db971bbb0b9f72604ea726c12d4 #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: update-dependencies | |
on: | |
workflow_dispatch: | |
run-name: Update Dependencies [${{ github.event_name }}][${{ github.head_ref || github.ref_name }}] rev.${{ github.sha }} | |
jobs: | |
build-mac-os: | |
runs-on: macos-latest | |
env: | |
GO_VERSION: 1.20.14 | |
CMAKE_VERSION: '3.22.x' | |
GOARCH: arm64 | |
GOOS: darwin | |
CGO_ENABLED: 1 | |
GOPATH: ${{ github.workspace }}/.go | |
CMAKE_BUILD_PARALLEL_LEVEL: 4 | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
clean: true | |
submodules: true | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Set up CMake | |
uses: jwlawson/[email protected] | |
with: | |
cmake-version: ${{ env.CMAKE_VERSION }} | |
- name: Prepare | |
run: | | |
go clean -cache -x | |
- name: Build | |
run: | | |
export CPP=${CXX} | |
export PATH=$GOPATH/bin:$GOPATH/bin/${GOOS}_${GOARCH}:$PATH | |
go generate | |
- name: Remove unnecessary files | |
run: | | |
pushd internal/windows/amd64/bindings/ | |
rm -rf bin/ share/ ssl/ | |
popd | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: gen_darwin_${{ github.sha }} | |
path: internal/darwin/arm64/* | |
build-linux: | |
runs-on: ubuntu-latest | |
env: | |
GO_VERSION: 1.20.14 | |
CMAKE_VERSION: '3.22.x' | |
GOARCH: amd64 | |
GOOS: linux | |
CGO_ENABLED: 1 | |
CMAKE_BUILD_PARALLEL_LEVEL: 4 | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
clean: true | |
submodules: true | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Set up CMake | |
uses: jwlawson/[email protected] | |
with: | |
cmake-version: ${{ env.CMAKE_VERSION }} | |
- name: Prepare | |
run: | | |
go clean -cache -x | |
- name: Build | |
run: | | |
go generate | |
- name: Remove unnecessary files | |
run: | | |
pushd internal/windows/amd64/bindings/ | |
rm -rf bin/ share/ ssl/ | |
popd | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: gen_linux_${{ github.sha }} | |
path: internal/linux/amd64/* | |
build-windows: | |
runs-on: windows-latest | |
env: | |
GO_VERSION: 1.20.14 | |
CMAKE_VERSION: '3.22.x' | |
MINGW_VERSION: 11.1.0 | |
MINGW_ARCH: x64 | |
GOARCH: amd64 | |
GOOS: windows | |
CGO_ENABLED: 1 | |
CMAKE_BUILD_PARALLEL_LEVEL: 4 | |
MINGW_BASEDIR: 'C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin' | |
defaults: | |
run: | |
shell: cmd | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
clean: true | |
submodules: true | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Set up MinGW | |
uses: egor-tensin/setup-mingw@v2 | |
with: | |
static: true | |
platform: ${{ env.MINGW_ARCH }} | |
version: ${{ env.MINGW_VERSION }} | |
- name: Set up CMake | |
uses: jwlawson/[email protected] | |
with: | |
cmake-version: ${{ env.CMAKE_VERSION }} | |
- name: Prepare | |
run: | | |
go clean -cache -x | |
- name: Build | |
run: | | |
go generate | |
- name: Remove unnecessary files | |
run: | | |
cd internal/windows/amd64/bindings/ | |
rd /q /s bin | |
rd /q /s share | |
rd /q /s ssl | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: gen_windows_${{ github.sha }} | |
path: internal/windows/amd64/* | |
update: | |
needs: [ build-windows, build-linux, build-mac-os ] | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
clean: true | |
submodules: true | |
- name: Download Windows Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: gen_windows_${{ github.sha }} | |
path: internal/windows/amd64/ | |
- name: Download Linux Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: gen_linux_${{ github.sha }} | |
path: internal/linux/amd64/ | |
- name: Download MacOS Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: gen_darwin_${{ github.sha }} | |
path: internal/darwin/arm64/ | |
- uses: EndBug/add-and-commit@v9 | |
with: | |
default_author: github_actions | |
message: Update dependencies | |
add: | | |
- internal/windows/amd64/bindings/* | |
- internal/linux/amd64/bindings/* | |
- internal/darwin/arm64/bindings/* |