ci: retry attic push 3 times, and continue on errors
Signed-off-by: morguldir <morguldir@protonmail.com>
This commit is contained in:
parent
24c408f4c6
commit
02aee2f174
|
@ -138,24 +138,7 @@ jobs:
|
||||||
|
|
||||||
- name: Cache CI dependencies
|
- name: Cache CI dependencies
|
||||||
run: |
|
run: |
|
||||||
# attic nix binary cache server is very, very terribly flakey. nothing i can do to fix it other than retry multiple times here
|
bin/nix-build-and-cache ci
|
||||||
set +e # Don't exit on errors
|
|
||||||
ATTEMPTS=3
|
|
||||||
SUCCESS=false
|
|
||||||
while (( ATTEMPTS-- > 0 ))
|
|
||||||
do
|
|
||||||
bin/nix-build-and-cache ci
|
|
||||||
if [[ $? == 0 ]]; then
|
|
||||||
SUCCESS=true
|
|
||||||
break
|
|
||||||
else
|
|
||||||
sleep 3
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ $SUCCESS == "false" ]]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# use sccache for Rust
|
# use sccache for Rust
|
||||||
- name: Run sccache-cache
|
- name: Run sccache-cache
|
||||||
|
@ -305,24 +288,7 @@ jobs:
|
||||||
CARGO_DEB_TARGET_TUPLE=$(echo ${{ matrix.target }} | grep -o -E '^([^-]*-){3}[^-]*')
|
CARGO_DEB_TARGET_TUPLE=$(echo ${{ matrix.target }} | grep -o -E '^([^-]*-){3}[^-]*')
|
||||||
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
|
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
|
||||||
|
|
||||||
# attic nix binary cache server is very, very terribly flakey. nothing i can do to fix it other than retry multiple times here
|
bin/nix-build-and-cache just .#static-${{ matrix.target }}-all-features
|
||||||
set +e # Don't exit on errors
|
|
||||||
ATTEMPTS=3
|
|
||||||
SUCCESS=false
|
|
||||||
while (( ATTEMPTS-- > 0 ))
|
|
||||||
do
|
|
||||||
bin/nix-build-and-cache just .#static-${{ matrix.target }}-all-features
|
|
||||||
if [[ $? == 0 ]]; then
|
|
||||||
SUCCESS=true
|
|
||||||
break
|
|
||||||
else
|
|
||||||
sleep 3
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ $SUCCESS == "false" ]]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -v -p target/release/
|
mkdir -v -p target/release/
|
||||||
mkdir -v -p target/$CARGO_DEB_TARGET_TUPLE/release/
|
mkdir -v -p target/$CARGO_DEB_TARGET_TUPLE/release/
|
||||||
|
@ -346,24 +312,7 @@ jobs:
|
||||||
CARGO_DEB_TARGET_TUPLE=$(echo ${{ matrix.target }} | grep -o -E '^([^-]*-){3}[^-]*')
|
CARGO_DEB_TARGET_TUPLE=$(echo ${{ matrix.target }} | grep -o -E '^([^-]*-){3}[^-]*')
|
||||||
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
|
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
|
||||||
|
|
||||||
# attic nix binary cache server is very, very terribly flakey. nothing i can do to fix it other than retry multiple times here
|
bin/nix-build-and-cache just .#static-${{ matrix.target }}-all-features-debug
|
||||||
set +e # Don't exit on errors
|
|
||||||
ATTEMPTS=3
|
|
||||||
SUCCESS=false
|
|
||||||
while (( ATTEMPTS-- > 0 ))
|
|
||||||
do
|
|
||||||
bin/nix-build-and-cache just .#static-${{ matrix.target }}-all-features-debug
|
|
||||||
if [[ $? == 0 ]]; then
|
|
||||||
SUCCESS=true
|
|
||||||
break
|
|
||||||
else
|
|
||||||
sleep 3
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ $SUCCESS == "false" ]]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# > warning: dev profile is not supported and will be a hard error in the future. cargo-deb is for making releases, and it doesn't make sense to use it with dev profiles.
|
# > warning: dev profile is not supported and will be a hard error in the future. cargo-deb is for making releases, and it doesn't make sense to use it with dev profiles.
|
||||||
# so we need to coerce cargo-deb into thinking this is a release binary
|
# so we need to coerce cargo-deb into thinking this is a release binary
|
||||||
|
@ -426,47 +375,13 @@ jobs:
|
||||||
|
|
||||||
- name: Build OCI image ${{ matrix.target }}
|
- name: Build OCI image ${{ matrix.target }}
|
||||||
run: |
|
run: |
|
||||||
# attic nix binary cache server is very, very terribly flakey. nothing i can do to fix it other than retry multiple times here
|
bin/nix-build-and-cache just .#oci-image-${{ matrix.target }}-all-features
|
||||||
set +e # Don't exit on errors
|
|
||||||
ATTEMPTS=3
|
|
||||||
SUCCESS=false
|
|
||||||
while (( ATTEMPTS-- > 0 ))
|
|
||||||
do
|
|
||||||
bin/nix-build-and-cache just .#oci-image-${{ matrix.target }}-all-features
|
|
||||||
if [[ $? == 0 ]]; then
|
|
||||||
SUCCESS=true
|
|
||||||
break
|
|
||||||
else
|
|
||||||
sleep 3
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ $SUCCESS == "false" ]]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
cp -v -f result oci-image-${{ matrix.target }}.tar.gz
|
cp -v -f result oci-image-${{ matrix.target }}.tar.gz
|
||||||
|
|
||||||
- name: Build debug OCI image ${{ matrix.target }}
|
- name: Build debug OCI image ${{ matrix.target }}
|
||||||
run: |
|
run: |
|
||||||
# attic nix binary cache server is very, very terribly flakey. nothing i can do to fix it other than retry multiple times here
|
bin/nix-build-and-cache just .#oci-image-${{ matrix.target }}-all-features-debug
|
||||||
set +e # Don't exit on errors
|
|
||||||
ATTEMPTS=3
|
|
||||||
SUCCESS=false
|
|
||||||
while (( ATTEMPTS-- > 0 ))
|
|
||||||
do
|
|
||||||
bin/nix-build-and-cache just .#oci-image-${{ matrix.target }}-all-features-debug
|
|
||||||
if [[ $? == 0 ]]; then
|
|
||||||
SUCCESS=true
|
|
||||||
break
|
|
||||||
else
|
|
||||||
sleep 3
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ $SUCCESS == "false" ]]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
cp -v -f result oci-image-${{ matrix.target }}-debug.tar.gz
|
cp -v -f result oci-image-${{ matrix.target }}-debug.tar.gz
|
||||||
|
|
||||||
|
|
|
@ -110,24 +110,7 @@ jobs:
|
||||||
|
|
||||||
- name: Cache CI dependencies
|
- name: Cache CI dependencies
|
||||||
run: |
|
run: |
|
||||||
# attic nix binary cache server is very, very terribly flakey. nothing i can do to fix it other than retry multiple times here
|
bin/nix-build-and-cache ci
|
||||||
set +e # Don't exit on errors
|
|
||||||
ATTEMPTS=3
|
|
||||||
SUCCESS=false
|
|
||||||
while (( ATTEMPTS-- > 0 ))
|
|
||||||
do
|
|
||||||
bin/nix-build-and-cache ci
|
|
||||||
if [[ $? == 0 ]]; then
|
|
||||||
SUCCESS=true
|
|
||||||
break
|
|
||||||
else
|
|
||||||
sleep 3
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ $SUCCESS == "false" ]]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Run lychee and markdownlint
|
- name: Run lychee and markdownlint
|
||||||
run: |
|
run: |
|
||||||
|
@ -136,24 +119,7 @@ jobs:
|
||||||
|
|
||||||
- name: Build documentation (book)
|
- name: Build documentation (book)
|
||||||
run: |
|
run: |
|
||||||
# attic nix binary cache server is very, very terribly flakey. nothing i can do to fix it other than retry multiple times here
|
bin/nix-build-and-cache just .#book
|
||||||
set +e # Don't exit on errors
|
|
||||||
ATTEMPTS=3
|
|
||||||
SUCCESS=false
|
|
||||||
while (( ATTEMPTS-- > 0 ))
|
|
||||||
do
|
|
||||||
bin/nix-build-and-cache just .#book
|
|
||||||
if [[ $? == 0 ]]; then
|
|
||||||
SUCCESS=true
|
|
||||||
break
|
|
||||||
else
|
|
||||||
sleep 3
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ $SUCCESS == "false" ]]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
cp -r --dereference result public
|
cp -r --dereference result public
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,9 @@ just() {
|
||||||
)
|
)
|
||||||
done
|
done
|
||||||
|
|
||||||
|
withattic() {
|
||||||
|
nix shell --inputs-from "$toplevel" attic --command xargs attic push "$@" <<< "${cache[*]}"
|
||||||
|
}
|
||||||
# Upload them to Attic (conduit store)
|
# Upload them to Attic (conduit store)
|
||||||
#
|
#
|
||||||
# Use `xargs` and a here-string because something would probably explode if
|
# Use `xargs` and a here-string because something would probably explode if
|
||||||
|
@ -41,8 +44,7 @@ just() {
|
||||||
# store paths include a newline in them.
|
# store paths include a newline in them.
|
||||||
(
|
(
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
nix shell --inputs-from "$toplevel" attic -c xargs \
|
withattic conduit || withattic conduit || withattic conduit || true
|
||||||
attic push conduit <<< "${cache[*]}"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# main "conduwuit" store
|
# main "conduwuit" store
|
||||||
|
@ -59,8 +61,7 @@ just() {
|
||||||
# store paths include a newline in them.
|
# store paths include a newline in them.
|
||||||
(
|
(
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
nix shell --inputs-from "$toplevel" attic -c xargs \
|
withattic conduwuit || withattic conduwuit || withattic conduwuit || true
|
||||||
attic push conduwuit <<< "${cache[*]}"
|
|
||||||
|
|
||||||
# push to cachix if available
|
# push to cachix if available
|
||||||
if [ "$CACHIX_AUTH_TOKEN" ]; then
|
if [ "$CACHIX_AUTH_TOKEN" ]; then
|
||||||
|
|
Loading…
Reference in New Issue