Skip to content

Commit 18cd0ae

Browse files
committed
CI pkgx fixes
pkgxdev/dev#56
1 parent 0072371 commit 18cd0ae

File tree

1 file changed

+51
-9
lines changed

1 file changed

+51
-9
lines changed

.github/workflows/ci-cd.yml

Lines changed: 51 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
tag-exists: ${{ steps.parse.outputs.tag-exists }}
2424
steps:
2525
- uses: actions/checkout@v6
26-
- uses: pkgxdev/dev@v1
26+
- uses: pkgxdev/dev@fix-erlang
2727
- name: Parse version
2828
id: parse
2929
uses: ./.github/actions/version
@@ -36,17 +36,45 @@ jobs:
3636
runs-on: ubuntu-latest
3737
steps:
3838
- uses: actions/checkout@v6
39-
- uses: pkgxdev/dev@v1
40-
- run: mix deps.get
41-
- run: mix test
39+
- uses: pkgxdev/dev@fix-erlang
40+
- name: Resolve ERL_BASE
41+
run: |
42+
unset ERL_ROOTDIR
43+
ERL_BIN="$(command -v erl)"
44+
ERL_BIN_REAL="$(readlink -f "$ERL_BIN")"
45+
ERL_DIR="$(dirname "$(dirname "$ERL_BIN_REAL")")"
46+
if [ -d "$ERL_DIR/lib/erlang" ]; then
47+
ERL_BASE="$ERL_DIR/lib/erlang"
48+
else
49+
ERL_BASE="$ERL_DIR"
50+
fi
51+
echo "ERL_BASE=$ERL_BASE" >> "$GITHUB_ENV"
52+
echo "ERL_ROOTDIR=$ERL_BASE" >> "$GITHUB_ENV"
53+
- run: pkgx +invisible-island.net/ncurses -- mix deps.get
54+
- run: pkgx +invisible-island.net/ncurses -- mix deps.compile
55+
- run: pkgx +invisible-island.net/ncurses -- mix test
4256

4357
audit:
4458
needs: [ version ]
4559
runs-on: ubuntu-latest
4660
steps:
4761
- uses: actions/checkout@v6
48-
- uses: pkgxdev/dev@v1
49-
- run: mix deps.get
62+
- uses: pkgxdev/dev@fix-erlang
63+
- name: Resolve ERL_BASE
64+
run: |
65+
unset ERL_ROOTDIR
66+
ERL_BIN="$(command -v erl)"
67+
ERL_BIN_REAL="$(readlink -f "$ERL_BIN")"
68+
ERL_DIR="$(dirname "$(dirname "$ERL_BIN_REAL")")"
69+
if [ -d "$ERL_DIR/lib/erlang" ]; then
70+
ERL_BASE="$ERL_DIR/lib/erlang"
71+
else
72+
ERL_BASE="$ERL_DIR"
73+
fi
74+
echo "ERL_BASE=$ERL_BASE" >> "$GITHUB_ENV"
75+
echo "ERL_ROOTDIR=$ERL_BASE" >> "$GITHUB_ENV"
76+
- run: pkgx +invisible-island.net/ncurses -- mix deps.get
77+
- run: pkgx +invisible-island.net/ncurses -- mix deps.compile
5078
- uses: ./.github/actions/dialyzer-cache
5179
with:
5280
otp-version: ${{ needs.version.outputs.otp-version }}
@@ -90,11 +118,25 @@ jobs:
90118
matrix: ${{ steps.set-matrix.outputs.matrix }}
91119
steps:
92120
- uses: actions/checkout@v6
93-
- uses: pkgxdev/dev@v1
94-
- run: mix deps.get
121+
- uses: pkgxdev/dev@fix-erlang
122+
- name: Resolve ERL_BASE
123+
run: |
124+
unset ERL_ROOTDIR
125+
ERL_BIN="$(command -v erl)"
126+
ERL_BIN_REAL="$(readlink -f "$ERL_BIN")"
127+
ERL_DIR="$(dirname "$(dirname "$ERL_BIN_REAL")")"
128+
if [ -d "$ERL_DIR/lib/erlang" ]; then
129+
ERL_BASE="$ERL_DIR/lib/erlang"
130+
else
131+
ERL_BASE="$ERL_DIR"
132+
fi
133+
echo "ERL_BASE=$ERL_BASE" >> "$GITHUB_ENV"
134+
echo "ERL_ROOTDIR=$ERL_BASE" >> "$GITHUB_ENV"
135+
- run: pkgx +invisible-island.net/ncurses -- mix deps.get
136+
- run: pkgx +invisible-island.net/ncurses -- mix deps.compile
95137
- id: set-matrix
96138
name: Discover E2E tests
97-
run: mix e2e.set_github_matrix matrix
139+
run: pkgx +invisible-island.net/ncurses -- mix e2e.set_github_matrix matrix
98140

99141
e2e-tests:
100142
needs: [ build, e2e-tests-discovery ]

0 commit comments

Comments
 (0)