diff --git a/.github/actions/bump.ts b/.github/actions/bump.ts index 0634e40..aa2a776 100755 --- a/.github/actions/bump.ts +++ b/.github/actions/bump.ts @@ -163,16 +163,7 @@ function mapPlatformToBottleTag(platform: string): string { function generateBottleBlock(bottles: Bottle[], version: string) { let bottleBlock = "bottle do\n" for (const { platform, sha256 } of bottles) { - if (platform === "x86_64_linux") { - bottleBlock += "" + - " # Linux bottles fail currently: patchelf breaks deno compiled binaries.\n" + - " # https://github.com/pkgxdev/brewkit/blob/main/share/brewkit/fix-elf.ts#L38-L42\n" + - " # and it's not possible to skip relocation in linuxbrew:\n" + - " # https://github.com/Homebrew/brew/blob/d1f60aea49d35fc0ba8f02a1f4fd26d0a369e071/Library/Homebrew/extend/os/linux/software_spec.rb\n" + - ` #sha256 cellar: :any_skip_relocation, ${platform}: "${sha256}"\n` - } else { - bottleBlock += ` sha256 cellar: :any_skip_relocation, ${platform}: "${sha256}"\n` - } + bottleBlock += ` sha256 cellar: :any_skip_relocation, ${platform}: "${sha256}"\n` } bottleBlock += ` root_url "${rootUrl}/v${version}"\n` bottleBlock += " end" diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml index e49159f..46bfe3d 100644 --- a/.github/workflows/bump.yml +++ b/.github/workflows/bump.yml @@ -1,5 +1,5 @@ # h/t https://github.com/jonchang/homebrew-tap/blob/main/.github/workflows/bump.yml -name: bump version +name: bump n bottle on: push: @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: Homebrew/actions/setup-homebrew@master - - uses: pkgxdev/setup@v1 + - uses: pkgxdev/setup@v2 - run: .github/actions/bump.ts ${{ github.event.inputs.version }} id: bump @@ -43,8 +43,17 @@ jobs: files: bottles/* fail_on_unmatched_files: true generate_release_notes: true + if: steps.bump.outputs.name - - name: test `brew install` + test: + needs: bump + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: Homebrew/actions/setup-homebrew@master + - name: brew install pkgxdev/made/pkgx run: | - brew install ./pkgx.rb + brew install pkgxdev/made/pkgx pkgx semverator satisfies ^1 1.0.0 diff --git a/.github/workflows/ci.pkgm.yml b/.github/workflows/ci.pkgm.yml index eabcdda..939c661 100644 --- a/.github/workflows/ci.pkgm.yml +++ b/.github/workflows/ci.pkgm.yml @@ -1,3 +1,5 @@ +name: ci/pkgm + on: pull_request: paths: diff --git a/.github/workflows/ci.pkgx.yml b/.github/workflows/ci.pkgx.yml index 69b6fca..325f484 100644 --- a/.github/workflows/ci.pkgx.yml +++ b/.github/workflows/ci.pkgx.yml @@ -1,3 +1,5 @@ +name: ci/pkgx + on: pull_request: paths: @@ -5,7 +7,10 @@ on: jobs: smoke: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: Homebrew/actions/setup-homebrew@master diff --git a/pkgx.rb b/pkgx.rb index 923f4a9..88fd9b6 100644 --- a/pkgx.rb +++ b/pkgx.rb @@ -11,19 +11,16 @@ class Pkgx < Formula end bottle do - sha256 cellar: :any_skip_relocation, arm64_big_sur: "11766d5262265c9652ec7456b4df19c14f6c60478c98cbf80c3415a4158efe10" - sha256 cellar: :any_skip_relocation, big_sur: "d13bbcaa822abf3f98e7930cc54f08373695eab2ce675cc9adb1a22889a3ac90" - # Linux bottles fail currently: patchelf breaks deno compiled binaries. - # https://github.com/pkgxdev/brewkit/blob/main/share/brewkit/fix-elf.ts#L38-L42 - # and it's not possible to skip relocation in linuxbrew: - # https://github.com/Homebrew/brew/blob/d1f60aea49d35fc0ba8f02a1f4fd26d0a369e071/Library/Homebrew/extend/os/linux/software_spec.rb - #sha256 cellar: :any_skip_relocation, x86_64_linux: "4c5b8b8a3d7046c2328b8849fcc7b8012e41e872b113952de83139e8bd1deb88" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "870330d6a1ee55356f876d062bad28f2d4a2e7c7ee24e61d5155ec9310a33be3" + sha256 cellar: :any_skip_relocation, big_sur: "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + sha256 cellar: :any_skip_relocation, x86_64_linux: "c7167aedfb196135460b363a5b5ecd419acd205937e80ec1284df5893af50842" root_url "https://github.com/pkgxdev/homebrew-made/releases/download/v2.0.0" end depends_on "deno" => :build depends_on "unzip" => :build # deno >=1.39.1 uses unzip when remote-fetching their compilable runtime depends_on "rust" => :build + depends_on "openssl" => :build def install if File.file? "Cargo.toml"