Skip to content

Commit

Permalink
Experiment with go.work in workflows/syncsubdeps.
Browse files Browse the repository at this point in the history
Trying to avoid go get having to download dependencies. We just want
it up update go.mod and go.sum.
  • Loading branch information
tommie committed Dec 30, 2023
1 parent e5829d0 commit a5f1051
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/syncsubdeps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,24 @@ jobs:
with:
fetch-depth: 1

- name: Set Up Workspace
# Submodules shouldn't cause a download.
run: |
set -o pipefail
go work init . $(ls ./deps/*_*/cgo.go | xargs -r dirname)
- name: Update go.mod
run: |
find deps -maxdepth 2 -type f -name libmanifest | \
xargs -r dirname | \
xargs -rn1 basename | \
while read os_arch; do
go get "github.com/${{ github.repository }}/deps/$os_arch@${{ github.sha }}"
done
set -o pipefail
submods=(
$(find deps -maxdepth 2 -type f -name libmanifest | \
xargs -r dirname | \
xargs -rn1 basename | \
while read os_arch; do
echo "github.com/${{ github.repository }}/deps/$os_arch@${{ github.sha }}"
done)
)
go get "${submods[@]}"
- id: info
name: Extract Information
Expand Down

0 comments on commit a5f1051

Please sign in to comment.