Skip to content

Commit b22dea3

Browse files
committed
wip
1 parent 6e9130c commit b22dea3

File tree

13 files changed

+62
-89
lines changed

13 files changed

+62
-89
lines changed

.github/modify-pantry/action.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
runs:
22
using: composite
33
steps:
4-
- run: pkgx --sync #FIXME bug where shebangs don’t cause an auto-sync
5-
shell: bash
64
- uses: fregante/setup-git-user@v2
75
- run: git update-ref refs/remotes/origin/main HEAD
86
working-directory: ${{ github.workspace }}

.github/setup-pantry/action.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Setup pantry overlay
2+
description: >
3+
Checks out upstream pkgxdev/pantry and merges brewkit's test packages on top.
4+
Sets PKGX_PANTRY_DIR and PKGX_PANTRY_PATH for subsequent steps.
5+
6+
inputs:
7+
path:
8+
description: >
9+
Path to the brewkit checkout (containing projects/).
10+
Defaults to $GITHUB_WORKSPACE at runtime (safe for containers).
11+
required: false
12+
13+
runs:
14+
using: composite
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
repository: pkgxdev/pantry
19+
path: .upstream-pantry
20+
21+
- shell: bash
22+
env:
23+
INPUT_PATH: ${{inputs.path}}
24+
run: |
25+
dir="${INPUT_PATH:-$GITHUB_WORKSPACE}"
26+
cp -rn "$GITHUB_WORKSPACE/.upstream-pantry/projects/"* "$dir/projects/"
27+
rm -rf "$GITHUB_WORKSPACE/.upstream-pantry"
28+
echo "PKGX_PANTRY_DIR=$dir" >> "$GITHUB_ENV"
29+
echo "PKGX_PANTRY_PATH=$dir" >> "$GITHUB_ENV"

.github/workflows/ci.actions.yml

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ jobs:
77
runs-on: ${{ matrix.platform.os }}
88
outputs:
99
pkg: ${{ steps.build.outputs.pkgjson }}
10-
env:
11-
PKGX_PANTRY_PATH: ${{github.workspace}}/co # v1
12-
PKGX_PANTRY_DIR: ${{github.workspace}}/co # v2
1310
strategy:
1411
matrix:
1512
platform:
@@ -22,9 +19,12 @@ jobs:
2219
steps:
2320
- uses: actions/checkout@v4
2421
with:
25-
path: co # test that things working isnt just a coincident of PWD == BREKWIT_DIR
22+
path: co # test that things working isn't just a coincident of PWD == BREKWIT_DIR
2623

2724
- uses: pkgxdev/setup@v4
25+
- uses: ./co/.github/setup-pantry
26+
with:
27+
path: ${{github.workspace}}/co
2828

2929
- uses: ./co/build
3030
id: build
@@ -50,14 +50,14 @@ jobs:
5050
- darwin+aarch64
5151
- null
5252
runs-on: ubuntu-latest
53-
env:
54-
PKGX_PANTRY_PATH: ${{github.workspace}}/co
55-
PKGX_PANTRY_DIR: ${{github.workspace}}/co
5653
steps:
5754
- uses: actions/checkout@v4
5855
with:
59-
path: co # test that things working isnt just a coincident of PWD == BREKWIT_DIR
56+
path: co # test that things working isn't just a coincident of PWD == BREKWIT_DIR
6057
- uses: pkgxdev/setup@v4
58+
- uses: ./co/.github/setup-pantry
59+
with:
60+
path: ${{github.workspace}}/co
6161
- uses: ./co/download-build-artifact
6262
with:
6363
pkg: ${{ needs.build.outputs.pkg }}
@@ -74,14 +74,14 @@ jobs:
7474
os:
7575
- ubuntu-latest
7676
- macos-latest
77-
env:
78-
PKGX_PANTRY_PATH: ${{github.workspace}}/co
79-
PKGX_PANTRY_DIR: ${{github.workspace}}/co
8077
steps:
8178
- uses: actions/checkout@v4
8279
with:
83-
path: co # test that things working isnt just a coincident of PWD == BREKWIT_DIR
80+
path: co # test that things working isn't just a coincident of PWD == BREKWIT_DIR
8481
- uses: pkgxdev/setup@v4
82+
- uses: ./co/.github/setup-pantry
83+
with:
84+
path: ${{github.workspace}}/co
8585
- uses: ./co/download-build-artifact
8686
with:
8787
pkg: ${{ needs.build.outputs.pkg }}
@@ -98,15 +98,15 @@ jobs:
9898
platform:
9999
- darwin+aarch64
100100
- linux+x86-64
101-
env:
102-
PKGX_PANTRY_PATH: ${{github.workspace}}/co
103-
PKGX_PANTRY_DIR: ${{github.workspace}}/co
104101
steps:
105102
- uses: actions/checkout@v4
106103
with:
107-
path: co # test that things working isnt just a coincident of PWD == BREKWIT_DIR
104+
path: co # test that things working isn't just a coincident of PWD == BREKWIT_DIR
108105

109106
- uses: pkgxdev/setup@v4
107+
- uses: ./co/.github/setup-pantry
108+
with:
109+
path: ${{github.workspace}}/co
110110

111111
- uses: ./co/download-build-artifact
112112
id: dl
@@ -131,37 +131,30 @@ jobs:
131131
steps:
132132
- uses: actions/checkout@v4
133133
- uses: pkgxdev/setup@v4
134+
- uses: ./.github/setup-pantry
134135

135136
- uses: ./build
136137
id: build
137138
with:
138139
pkg: unavailable.com
139-
env:
140-
PKGX_PANTRY_PATH: ${{github.workspace}}
141-
PKGX_PANTRY_DIR: ${{github.workspace}}
142140

143141
- run: echo ${{steps.build.outputs.noop}}
144142

145143
- run: exit 1
146144
if: ${{steps.build.outputs.noop != 'true'}}
147145

148146
id:
149-
env:
150-
PKGX_PANTRY_PATH: ${{github.workspace}}
151-
PKGX_PANTRY_DIR: ${{github.workspace}}
152147
runs-on: ubuntu-latest
153148
outputs:
154149
pkgs: ${{ steps.id.outputs.pkgs }}
155150
steps:
156151
- uses: actions/checkout@v4
157152
- uses: pkgxdev/setup@v4
153+
- uses: ./.github/setup-pantry
158154
- uses: ./id
159155
id: id
160156
with:
161157
pkg: stark.com/foo
162-
env:
163-
PKGX_PANTRY_PATH: ${{github.workspace}}
164-
PKGX_PANTRY_DIR: ${{github.workspace}}
165158
- run: test ${{ steps.id.outputs.version }} = 2.3.4
166159
- run: test ${{ steps.id.outputs.version-raw }} = 2.3.4
167160
- run: test -z "${{ steps.id.outputs.version-tag }}"

.github/workflows/ci.cli.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44

55
env:
66
GITHUB_TOKEN: ${{github.token}}
7-
PKGX_PANTRY_PATH: ${{github.workspace}}
8-
PKGX_PANTRY_DIR: ${{github.workspace}}
97

108
jobs:
119
integration-tests:
@@ -34,11 +32,12 @@ jobs:
3432
runs-on: ${{ matrix.platform.os }}
3533
container: ${{ matrix.platform.img }}
3634
steps:
35+
# we need libc6-dev headers
36+
- run: apt-get update && apt-get install -y libc6-dev
37+
if: matrix.platform.img != null
3738
- uses: actions/checkout@v4
3839
- uses: pkgxdev/setup@v4
39-
40-
# otherwise, we're getting some weird race conditions on CI
41-
- run: pkgx --sync
40+
- uses: ./.github/setup-pantry
4241

4342
- run: bin/bk build ${{matrix.pkg}}
4443
- run: bin/bk test ${{matrix.pkg}}
@@ -49,6 +48,7 @@ jobs:
4948
steps:
5049
- uses: actions/checkout@v4
5150
- uses: pkgxdev/setup@v4
51+
- uses: ./.github/setup-pantry
5252
- uses: ./.github/modify-pantry
5353
- run: test $(bin/bk status) = stark.com/foo
5454
- run: bin/bk build
@@ -60,10 +60,10 @@ jobs:
6060

6161
unit-tests:
6262
runs-on: ubuntu-latest
63-
env:
64-
PKGX_PANTRY_PATH: null
65-
PKGX_PANTRY_DIR: null
6663
steps:
64+
- run: |
65+
unset PKGX_PANTRY_PATH
66+
unset PKGX_PANTRY_DIR
6767
- uses: actions/checkout@v4
6868
- uses: pkgxdev/dev@v1
6969
- run: deno test --allow-env --allow-net --ignore=.data
@@ -74,7 +74,7 @@ jobs:
7474
steps:
7575
- uses: actions/checkout@v4
7676
- uses: pkgxdev/setup@v4
77-
- run: pkgx --sync # FIXME PKGX_PANTRY_PATH causes auto sync to fail
77+
- uses: ./.github/setup-pantry
7878
- name: build
7979
run: |
8080
set +e

audit/action.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@ inputs:
1414
runs:
1515
using: composite
1616
steps:
17-
- run: |
18-
if ! pkgx --sync; then
19-
echo "::error::you must use: pkgxdev/setup before using this action"
20-
exit 1
21-
fi
22-
shell: bash
23-
2417
- name: fetch deno deps
2518
shell: bash
2619
run: |

build/action.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,6 @@ outputs:
3636
runs:
3737
using: composite
3838
steps:
39-
- name: prep
40-
run: |
41-
if ! pkgx --sync; then
42-
echo "::error::you must use: pkgxdev/setup before using this action"
43-
exit 1
44-
fi
45-
shell: bash
46-
4739
- name: fetch deno deps
4840
shell: bash
4941
run: |

download-build-artifact/action.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,6 @@ outputs:
4141
runs:
4242
using: composite
4343
steps:
44-
- run: |
45-
if ! pkgx --sync; then
46-
echo "::error::you must use: pkgxdev/setup before using this action"
47-
exit 1
48-
fi
49-
shell: bash
50-
5144
- name: fetch deno deps
5245
shell: bash
5346
run: |

id/action.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
name:
2-
pkgx/brewkit/id
3-
description:
4-
resolve a specific version, including the raw version and tag (if available)
1+
name: pkgx/brewkit/id
2+
description: resolve a specific version, including the raw version and tag (if available)
53

64
inputs:
75
pkg:
@@ -28,14 +26,6 @@ outputs:
2826
runs:
2927
using: composite
3028
steps:
31-
- name: prep
32-
run: |
33-
if ! pkgx --sync; then
34-
echo "::error::you must use: pkgxdev/setup before using this action"
35-
exit 1
36-
fi
37-
shell: bash
38-
3929
- name: fetch deno deps
4030
run: |
4131
echo "::group::fetch deno deps"

projects/pyapp.com/pip/package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ versions:
77
- 1.0.0
88

99
dependencies:
10-
pkgx.sh: ^1
10+
pkgx.sh: ^2
1111

1212
build:
1313
dependencies:

projects/pyapp.com/poetry/package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ versions:
22
- 1.0.0
33

44
dependencies:
5-
pkgx.sh: ^1
5+
pkgx.sh: ^2
66

77
build:
88
dependencies:

0 commit comments

Comments
 (0)