Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/binary-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:

- name: Generate artifact attestation
id: certificate
uses: actions/attest-build-provenance@v1
uses: actions/attest@v4
with:
subject-path: "result/bin/dune"
show-summary: false
Expand All @@ -108,7 +108,7 @@ jobs:
gzip -9 ~/build/$ARCHIVE_TAR
rm -rf ~/build/$ARCHIVE_DIR

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
path: ~/build
name: ${{ matrix.name }}
Expand All @@ -128,16 +128,17 @@ jobs:
runs-on: ${{ matrix.os }}
needs: binary
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
name: ${{ matrix.name }}

- name: Install newly-built dune
run: |
mkdir -p ~/.local/bin
DATE=$(date +'%Y-%m-%d')
ARCHIVE_DIR="dune-$DATE-${{ matrix.name }}"
ARCHIVE_TARGZ="${ARCHIVE_DIR}.tar.gz"
mv ${{ matrix.name }}/$ARCHIVE_TARGZ .
tar -xvf $ARCHIVE_TARGZ
mkdir -p ~/.local/bin
tar xvf $ARCHIVE_TARGZ

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change doesn't seem to be accounted for in your PR description. What motevates the need to change logic here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change is that due to only downloading the relevant artifact (e.g. download just the musl artifact on Linux) the download artifact action does no longer put the artifact in a subdirectory keyed by name but directly in the worktree, thus the code would fail.

mv ./$ARCHIVE_DIR/dune ~/.local/bin/dune

- name: Checkout
Expand Down Expand Up @@ -192,7 +193,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v6

- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
path: /home/runner/artifacts

Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/binary-stable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:

- name: Generate artifact attestation
id: certificate
uses: actions/attest-build-provenance@v1
uses: actions/attest@v4
with:
subject-path: "result/bin/dune"
show-summary: false
Expand All @@ -130,7 +130,7 @@ jobs:
gzip -9 ~/build/$ARCHIVE_TAR
rm -rf ~/build/$ARCHIVE_DIR

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
path: ~/build
name: ${{ matrix.name }}
Expand All @@ -151,15 +151,16 @@ jobs:
runs-on: ${{ matrix.os }}
needs: [check_build, binary]
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
name: ${{ matrix.name }}

- name: Install newly-built dune
run: |
mkdir -p ~/.local/bin
ARCHIVE_DIR="dune-${{ needs.check_build.outputs.release }}-${{ matrix.name }}"
ARCHIVE_TARGZ="${ARCHIVE_DIR}.tar.gz"
mv ${{ matrix.name }}/$ARCHIVE_TARGZ .
tar -xvf $ARCHIVE_TARGZ
mkdir -p ~/.local/bin
tar xvf $ARCHIVE_TARGZ
mv ./$ARCHIVE_DIR/dune ~/.local/bin/dune

- name: Checkout
Expand Down Expand Up @@ -191,13 +192,13 @@ jobs:
- name: Install dune
uses: ocaml-dune/setup-dune@v2

- uses: actions/download-artifact@v4
with:
path: /home/runner/artifacts

- name: "Install Sandworm deps & build"
run: dune build

- uses: actions/download-artifact@v8
with:
path: /home/runner/artifacts

- name: Move artifacts to scope
run: mv "/home/runner/artifacts" "."

Expand Down