Skip to content

Commit

Permalink
Temporarily use official deno on brewkit actions on darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecrs committed Apr 1, 2024
1 parent e0f7006 commit 7f4ffdf
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 7 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,14 @@ jobs:
- uses: actions/checkout@v4
- uses: pkgxdev/setup@v2

- uses: denoland/setup-deno@v1
if: runner.os == 'macos'

- run: pkgx install deno
if: runner.os == 'linux'

- name: precache # makes it easier to read the real output
run: pkgx deno cache test/test.ts build/build.ts
run: deno cache test/test.ts build/build.ts

- run: bin/bk build ${{matrix.pkg}}
- run: bin/bk test ${{matrix.pkg}}
Expand Down
9 changes: 8 additions & 1 deletion audit/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,19 @@ runs:
fi
shell: bash
- uses: denoland/setup-deno@v1
if: runner.os == 'macos'

- run: pkgx install deno
shell: bash
if: runner.os == 'linux'

- name: fetch deno deps
shell: bash
run: |
echo "::group::fetch deno deps"
cd $GITHUB_ACTION_PATH
pkgx deno cache ./audit.ts
deno cache ./audit.ts
echo "::endgroup::"
- run: ${GITHUB_ACTION_PATH}/audit.ts '${{ inputs.pkg }}'
Expand Down
2 changes: 1 addition & 1 deletion audit/audit.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!//usr/bin/env -S pkgx +git +gh deno run --allow-env --allow-read --allow-run --allow-net --ext=ts
#!//usr/bin/env -S pkgx +git +gh env deno run --allow-env --allow-read --allow-run --allow-net --ext=ts

import { Command } from "cliffy/command/mod.ts"
import { swallow } from "brewkit/utils.ts"
Expand Down
9 changes: 8 additions & 1 deletion build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,19 @@ runs:
fi
shell: bash

- uses: denoland/setup-deno@v1
if: runner.os == 'macos'

- run: pkgx install deno
shell: bash
if: runner.os == 'linux'

- name: fetch deno deps
shell: bash
run: |
echo "::group::fetch deno deps"
cd $GITHUB_ACTION_PATH
pkgx deno cache ./build.ts
deno cache ./build.ts
echo "::endgroup::"
- name: build
Expand Down
2 changes: 1 addition & 1 deletion build/build.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env -S pkgx +rsync +git +bash +gum +gh +curl +bzip2 +xz +unzip +lzip +column deno run --ext=ts --allow-env --allow-read --allow-write --allow-run --allow-net
#!/usr/bin/env -S pkgx +rsync +git +bash +gum +gh +curl +bzip2 +xz +unzip +lzip +column env deno run --ext=ts --allow-env --allow-read --allow-write --allow-run --allow-net

import make_build_script from "brewkit/porcelain/build-script.ts"
import { gum, rsync } from "brewkit/utils.ts"
Expand Down
9 changes: 8 additions & 1 deletion test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,19 @@ runs:
fi
shell: bash
- uses: denoland/setup-deno@v1
if: runner.os == 'macos'

- run: pkgx install deno
shell: bash
if: runner.os == 'linux'

- name: fetch deno deps
shell: bash
run: |
echo "::group::fetch deno deps"
cd ${GITHUB_ACTION_PATH}
pkgx deno cache ./test.ts
deno cache ./test.ts
echo "::endgroup::"
- name: test
Expand Down
2 changes: 1 addition & 1 deletion test/test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env -S pkgx +bash +gum +gh +rsync deno run --ext=ts --allow-env --allow-read --allow-write --allow-net --allow-run
#!/usr/bin/env -S pkgx +bash +gum +gh +rsync env deno run --ext=ts --allow-env --allow-read --allow-write --allow-net --allow-run

//TODO net required because we go to github for version info, but really we should require
// a built product that is then recorded for us to use
Expand Down

0 comments on commit 7f4ffdf

Please sign in to comment.