Skip to content

Commit

Permalink
Chore/update [email protected] + weshnet (berty#4866)
Browse files Browse the repository at this point in the history
* chore: remove gogoproto

Signed-off-by: D4ryl00 <[email protected]>

* chore: remove gogoproto, use latest weshnet

Signed-off-by: D4ryl00 <[email protected]>

* fix: tests

Signed-off-by: D4ryl00 <[email protected]>

* chore: disable nopfs kubo plugin in encrypted repo

Signed-off-by: D4ryl00 <[email protected]>

* chore: rename BertyID to BertyId

Signed-off-by: D4ryl00 <[email protected]>

* chore: fix ci lint

Signed-off-by: D4ryl00 <[email protected]>

* fix: unitest

Signed-off-by: D4ryl00 <[email protected]>

* chore: fix unitest + goreleaser deprecated flag

Signed-off-by: D4ryl00 <[email protected]>

* chore: fix CI

Signed-off-by: D4ryl00 <[email protected]>

* chore: add LazyVim in ssh-runner Github Action workflow

Signed-off-by: D4ryl00 <[email protected]>

* chore: use latest weshnet that should fix TestFlow in bertyaccount

Signed-off-by: D4ryl00 <[email protected]>

* chore: use remove deprecated --skip-publish flag in goreleaser

Signed-off-by: D4ryl00 <[email protected]>

* chore: update goreleaser config to v2

Signed-off-by: D4ryl00 <[email protected]>

* fix: Flipper for Xcode 15.3 or above

Signed-off-by: D4ryl00 <[email protected]>

* fix: Remove Flipper on iOS

Signed-off-by: D4ryl00 <[email protected]>

* fix: replace quic by quic-v1

Signed-off-by: D4ryl00 <[email protected]>

* chore: use latest weshnet

Signed-off-by: D4ryl00 <[email protected]>

* fix: change rdvp topic into valid UTF-8

Signed-off-by: D4ryl00 <[email protected]>

* chore: use berty.tech/weshnet/v2

Signed-off-by: D4ryl00 <[email protected]>

* chore: remove replace in go.mod for berty.tech/weshnet

Signed-off-by: D4ryl00 <[email protected]>

---------

Signed-off-by: D4ryl00 <[email protected]>
  • Loading branch information
D4ryl00 authored Oct 7, 2024
1 parent 8ea8c75 commit 8e2fbbe
Show file tree
Hide file tree
Showing 214 changed files with 26,053 additions and 72,369 deletions.
20 changes: 9 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ jobs:
client_payload: {"commit_message":${{ env.commit_message }}},
})
post-semantic-release:
needs: semantic-release
#if: needs.semantic-release.outputs.new-release-published == 'true'
Expand Down Expand Up @@ -140,20 +139,19 @@ jobs:
set -x +e
curl -i $url
build-asset:
needs: semantic-release
name: build asset
runs-on: ${{ matrix.config.runs-on }}
strategy:
matrix:
config: [
# @FIXME(gfanton): latest ubuntu version broke `Install Linux Dependencies` step
{runs-on: 'ubuntu-20.04', goos: 'linux'},
{runs-on: 'macos-latest', goos: 'darwin'},
{runs-on: 'windows-latest', goos: 'windows'},
# TODO: bertyguy
]
# @FIXME(gfanton): latest ubuntu version broke `Install Linux Dependencies` step
{ runs-on: "ubuntu-20.04", goos: "linux" },
{ runs-on: "macos-latest", goos: "darwin" },
{ runs-on: "windows-latest", goos: "windows" },
# TODO: bertyguy
]
env:
OSXCROSS_DIR: /home/runner/work/osxcross
steps:
Expand Down Expand Up @@ -194,7 +192,7 @@ jobs:
uses: actions/[email protected]
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ env.go_version }}-${{ env.json_cache-versions_go }}-${{ hashFiles('go/**/go.sum') }}
key: ${{ runner.os }}-go-${{ env.go_version }}-${{ env.json_cache-versions_go }}-${{ hashFiles('go/**/go.sum') }}
restore-keys: ${{ runner.os }}-go-${{ env.go_version }}-${{ env.json_cache-versions_go }}-

- name: Install Linux Dependencies
Expand All @@ -214,14 +212,14 @@ jobs:
if: needs.semantic-release.outputs.new-release-published != 'true'
with:
version: latest
args: release --rm-dist -f .github/workflows/utils/.goreleaser.${{ matrix.config.goos }}.yml --skip-publish
args: release --clean -f .github/workflows/utils/.goreleaser.${{ matrix.config.goos }}.yml --skip=publish

- name: Run GoReleaser (Publish)
uses: goreleaser/goreleaser-action@v3
if: needs.semantic-release.outputs.new-release-published == 'true'
with:
version: latest
args: release --rm-dist -f .github/workflows/utils/.goreleaser.${{ matrix.config.goos }}.yml
args: release --clean -f .github/workflows/utils/.goreleaser.${{ matrix.config.goos }}.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
37 changes: 23 additions & 14 deletions .github/workflows/ssh-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ on:
workflow_dispatch:
inputs:
os:
description: 'Operating System'
description: "Operating System"
required: true
default: ubuntu-latest
type: choice
options:
- ubuntu-latest
- macos-latest
- windows-latest
- ubuntu-latest
- macos-latest
- windows-latest
mod:
description: 'Install Go/Node modules'
description: "Install Go/Node modules"
required: true
default: true
type: boolean
Expand Down Expand Up @@ -61,15 +61,15 @@ jobs:
uses: actions/[email protected]
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ env.go_version }}-${{ env.json_cache-versions_go }}-${{ hashFiles('go/**/go.sum') }}
key: ${{ runner.os }}-go-${{ env.go_version }}-${{ env.json_cache-versions_go }}-${{ hashFiles('go/**/go.sum') }}
restore-keys: ${{ runner.os }}-go-${{ env.go_version }}-${{ env.json_cache-versions_go }}-

- name: Cache node modules
if: github.event.inputs.mod == 'true' && runner.os != 'Windows'
uses: actions/[email protected]
with:
path: js/node_modules
key: ${{ runner.OS }}-node-${{ env.node_version }}-${{ env.json_cache-versions_node }}-${{ hashFiles('js/yarn.lock') }}
key: ${{ runner.OS }}-node-${{ env.node_version }}-${{ env.json_cache-versions_node }}-${{ hashFiles('js/yarn.lock') }}
restore-keys: ${{ runner.OS }}-node-${{ env.node_version }}-${{ env.json_cache-versions_node }}-

- name: Fetch go modules
Expand All @@ -85,13 +85,22 @@ jobs:
- name: Install emacs
shell: bash
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get install -y emacs
elif [ "$RUNNER_OS" == "Windows" ]; then
choco install emacs
else
echo "Already installed!"
fi
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get install -y emacs
elif [ "$RUNNER_OS" == "Windows" ]; then
choco install emacs
else
echo "Already installed!"
fi
- name: Install LazyVim
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
git clone https://github.com/LazyVim/starter $env:LOCALAPPDATA\nvim
else
git clone https://github.com/LazyVim/starter ~/.config/nvim
fi
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/utils/.goreleaser.darwin.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
version: 2
changelog:
skip: true
disable: true

checksum:
name_template: '{{.ProjectName}}_darwin_checksums.txt'
name_template: "{{.ProjectName}}_darwin_checksums.txt"

env:
- GO111MODULE=on
Expand All @@ -13,7 +14,7 @@ before:
- go mod download

archives:
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
- name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"

builds:
- id: darwin
Expand All @@ -29,4 +30,4 @@ builds:
flags:
- "-a"
ldflags:
- '-X berty.tech/berty/v2/go/pkg/bertyversion.VcsRef=$(VCS_REF) -X berty.tech/berty/v2/go/pkg/bertyversion.Version=$(VERSION)'
- "-X berty.tech/berty/v2/go/pkg/bertyversion.VcsRef=$(VCS_REF) -X berty.tech/berty/v2/go/pkg/bertyversion.Version=$(VERSION)"
14 changes: 7 additions & 7 deletions .github/workflows/utils/.goreleaser.linux.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
version: 2
changelog:
skip: true
disable: true

checksum:
name_template: '{{.ProjectName}}_linux_checksums.txt'
name_template: "{{.ProjectName}}_linux_checksums.txt"

env:
- GO111MODULE=on
Expand All @@ -13,18 +14,17 @@ before:
- go mod download

archives:
- name_template: 'berty_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
- name_template: "berty_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
wrap_in_directory: true
id: berty
builds:
- berty
- name_template: 'bertygui_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
- name_template: "bertygui_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
wrap_in_directory: true
id: bertygui
builds:
- bertygui


builds:
- id: berty
binary: berty
Expand All @@ -39,7 +39,7 @@ builds:
flags:
- "-a"
ldflags:
- '-X berty.tech/berty/v2/go/pkg/bertyversion.VcsRef=$(VCS_REF) -X berty.tech/berty/v2/go/pkg/bertyversion.Version=$(VERSION)'
- "-X berty.tech/berty/v2/go/pkg/bertyversion.VcsRef=$(VCS_REF) -X berty.tech/berty/v2/go/pkg/bertyversion.Version=$(VERSION)"

- id: bertygui
binary: bertygui
Expand All @@ -54,4 +54,4 @@ builds:
- "-a"
- "-tags=bertygui"
ldflags:
- '-X berty.tech/berty/v2/go/pkg/bertyversion.VcsRef=$(VCS_REF) -X berty.tech/berty/v2/go/pkg/bertyversion.Version=$(VERSION)'
- "-X berty.tech/berty/v2/go/pkg/bertyversion.VcsRef=$(VCS_REF) -X berty.tech/berty/v2/go/pkg/bertyversion.Version=$(VERSION)"
19 changes: 10 additions & 9 deletions .github/workflows/utils/.goreleaser.windows.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
version: 2
changelog:
skip: true
disable: true

checksum:
name_template: '{{.ProjectName}}_windows_checksums.txt'
name_template: "{{.ProjectName}}_windows_checksums.txt"

env:
- GO111MODULE=on
Expand All @@ -13,19 +14,19 @@ before:
- go mod download

archives:
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
- name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
format_overrides:
- goos: windows
format: zip
- goos: windows
format: zip

builds:
- id: windows
binary: berty
env: ['CGO_ENABLED=1']
goos: ['windows']
goarch: ['amd64']
env: ["CGO_ENABLED=1"]
goos: ["windows"]
goarch: ["amd64"]
dir: go/cmd/berty
flags:
- "-a"
ldflags:
- '-X berty.tech/berty/v2/go/pkg/bertyversion.VcsRef=$(VCS_REF) -X berty.tech/berty/v2/go/pkg/bertyversion.Version=$(VERSION)'
- "-X berty.tech/berty/v2/go/pkg/bertyversion.VcsRef=$(VCS_REF) -X berty.tech/berty/v2/go/pkg/bertyversion.Version=$(VERSION)"
6 changes: 3 additions & 3 deletions .tool-versions
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# major version of Go which is allowed by kubo.
# There is no contraindication for updating it.
#-----
golang 1.20.11
golang 1.22.5

#-----
# This is the most recent LTS version available to date.
Expand Down Expand Up @@ -39,7 +39,7 @@ ruby 3.1.3
# This is simply the most recent golangci-lint version available to date.
#
#-----
golangci-lint 1.51.2
golangci-lint 1.59.1

#-----
# This is simply the most recent jq version available to date.
Expand All @@ -63,4 +63,4 @@ yq 4.30.8
# This is simply the most recent buf version available to date.
# There is no contraindication for updating it.
#-----
buf 1.15.1
buf 1.39.0
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG VCS_REF
ARG VERSION

# build
FROM golang:1.20-alpine as builder
FROM golang:1.22-alpine as builder
RUN apk add --no-cache git gcc musl-dev make binutils-gold
# CGO_CFLAGS="-D_LARGEFILE64_SOURCE" to fix a bug: https://github.com/mattn/go-sqlite3/issues/1164#issuecomment-1635253695
ENV GO111MODULE=on CGO_CFLAGS="-D_LARGEFILE64_SOURCE"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ docker.build:

goreleaser.dry-run:
$(call check-program, goreleaser)
goreleaser release --rm-dist --snapshot --skip-publish
goreleaser release --clean --snapshot --skip=publish
.PHONY: goreleaser.dry-run

doctor:
Expand Down
Loading

0 comments on commit 8e2fbbe

Please sign in to comment.