Skip to content

Commit

Permalink
remove brew install of go for ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
2xburnt committed Oct 1, 2024
1 parent a31b5e7 commit b7ef33f
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 47 deletions.
89 changes: 43 additions & 46 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,44 +17,44 @@ jobs:
matrix:
os: [macos-latest, ubuntu-latest]
version:
# - version: "0.1.0"
# go_version: "1.21"
# - version: "0.3.2"
# go_version: "1.21"
# - version: "0.3.3"
# go_version: "1.21"
# - version: "0.3.4"
# go_version: "1.21"
# - version: "0.3.7"
# go_version: "1.21"
# - version: "0.3.8"
# go_version: "1.21"
# - version: "0.3.9"
# go_version: "1.21"
# - version: "1.0.0"
# go_version: "1.21"
# - version: "2.0.0"
# go_version: "1.21"
# - version: "3.0.0"
# go_version: "1.21"
# - version: "3.1.0"
# go_version: "1.21"
# - version: "4.0.0"
# go_version: "1.21"
# - version: "5.0.0"
# go_version: "1.21"
# - version: "6.0.0"
# go_version: "1.21"
# - version: "7.0.0"
# go_version: "1.21"
# - version: "8.0.0"
# go_version: "1.21"
# - version: "8.0.1"
# go_version: "1.21"
# - version: "9.0.0"
# go_version: "1.21"
# - version: "9.0.1"
# go_version: "1.21"
- version: "0.1.0"
go_version: "1.21"
- version: "0.3.2"
go_version: "1.21"
- version: "0.3.3"
go_version: "1.21"
- version: "0.3.4"
go_version: "1.21"
- version: "0.3.7"
go_version: "1.21"
- version: "0.3.8"
go_version: "1.21"
- version: "0.3.9"
go_version: "1.21"
- version: "1.0.0"
go_version: "1.21"
- version: "2.0.0"
go_version: "1.21"
- version: "3.0.0"
go_version: "1.21"
- version: "3.1.0"
go_version: "1.21"
- version: "4.0.0"
go_version: "1.21"
- version: "5.0.0"
go_version: "1.21"
- version: "6.0.0"
go_version: "1.21"
- version: "7.0.0"
go_version: "1.21"
- version: "8.0.0"
go_version: "1.21"
- version: "8.0.1"
go_version: "1.21"
- version: "9.0.0"
go_version: "1.21"
- version: "9.0.1"
go_version: "1.21"
- version: "10.0.0"
go_version: "1.22"
- version: "11.0.1"
Expand All @@ -74,9 +74,11 @@ jobs:
run: |
export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"
brew install go@${{ matrix.version.go_version }}
cd $(brew --prefix go@${{ matrix.version.go_version }})/bin
brew unlink go || true
brew link -vv --force go@${{ matrix.version.go_version }}
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
sudo ln -fs $(brew --prefix go@${{ matrix.version.go_version }})/libexec/bin/go /usr/bin/go
else
sudo ln -fs $(brew --prefix go@${{ matrix.version.go_version }}) $(brew --prefix)/opt/go
fi
- name: Install Xiond
run: |
Expand All @@ -86,14 +88,9 @@ jobs:
if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"
export LEDGER_ENABLED=false
fi
export PATH="$(brew --prefix go@${{ matrix.version.go_version }})/libexec/bin/:$PATH"
echo "PATH: $PATH"
brew tap burnt-labs/xion
ls -la $(which go)
if [[ "${{ matrix.version.version }}" == "null" ]]; then
echo "Installing latest version of xiond"
brew install xiond
Expand Down
5 changes: 5 additions & 0 deletions Formula/xiond.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require_relative "../lib/base"

class Xiond < XiondBase
init "11.0.1", "82c599c27afb7d1fc0e017c9453ce923c3590991d31de06f673a69a7a05ae695"
end
3 changes: 2 additions & 1 deletion lib/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ def install_libwasmvm
end

def compile_and_install_xiond
path = ENV["PATH"]

Check failure on line 88 in lib/base.rb

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-22.04)

Style/FetchEnvVar: Use `ENV.fetch("PATH")` or `ENV.fetch("PATH", nil)` instead of `ENV["PATH"]`.

Check failure on line 88 in lib/base.rb

View workflow job for this annotation

GitHub Actions / test-bot (ubuntu-latest)

Style/FetchEnvVar: Use `ENV.fetch("PATH")` or `ENV.fetch("PATH", nil)` instead of `ENV["PATH"]`.

Check failure on line 88 in lib/base.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-14)

Style/FetchEnvVar: Use `ENV.fetch("PATH")` or `ENV.fetch("PATH", nil)` instead of `ENV["PATH"]`.
ledger_enabled = ENV["LEDGER_ENABLED"] == "true"
link_statically = ENV["LINK_STATICALLY"] == "true"
system "make", "install", "LEDGER_ENABLED=#{ledger_enabled}", "LINK_STATICALLY=#{link_statically}"
system "make", "install", "PATH=#{path}", "LEDGER_ENABLED=#{ledger_enabled}", "LINK_STATICALLY=#{link_statically}"
bin.install "#{ENV.fetch("GOPATH", nil)}/bin/xiond"
end

Expand Down

0 comments on commit b7ef33f

Please sign in to comment.