diff --git a/.forgejo/workflows/pgo-binary.yml b/.forgejo/workflows/pgo-binary.yml index 13a9fde..8d49954 100644 --- a/.forgejo/workflows/pgo-binary.yml +++ b/.forgejo/workflows/pgo-binary.yml @@ -62,24 +62,51 @@ jobs: run: | set -eu - rm -rf /tmp/riptide-pgo - mkdir -p /tmp/riptide-pgo/profiles + SITEMAP_URL='https://riptide-pgo.blitzw.in/sitemaps/sitemap.xml' + SITEMAP_URL_2='https://riptide-pgo.blitzw.in/sitemaps2/sitemap.xml' - RUSTFLAGS=" - -C target-feature=+crt-static - -C profile-generate=/tmp/riptide-pgo/profiles - " cargo build \ - --release \ - --target "$LINUX_TARGET" + printf 'Training round 1 with sitemap: <%s>\n' "$SITEMAP_URL" - cp \ - "target/$LINUX_TARGET/release/riptide" \ - /tmp/riptide-pgo/riptide + timeout 10m \ + /tmp/riptide-pgo/riptide \ + --sitemap "$SITEMAP_URL" \ + --output /tmp/pgo-urls.txt \ + --scheme https \ + --workers 16 \ + --timeout-secs 30 - chmod +x /tmp/riptide-pgo/riptide + test -s /tmp/pgo-urls.txt - file /tmp/riptide-pgo/riptide + echo "Training round 1 input:" + wc -l /tmp/pgo-urls.txt + printf 'Training round 2 with sitemap: <%s>\n' "$SITEMAP_URL_2" + + timeout 10m \ + /tmp/riptide-pgo/riptide \ + --sitemap "$SITEMAP_URL_2" \ + --output /tmp/pgo-urls-2.txt \ + --scheme https \ + --workers 16 \ + --timeout-secs 30 + + test -s /tmp/pgo-urls-2.txt + + echo "Training round 2 input:" + wc -l /tmp/pgo-urls-2.txt + + echo "Generated profiles:" + find /tmp/riptide-pgo/profiles \ + -name '*.profraw' \ + -type f \ + -print + + test -n "$( + find /tmp/riptide-pgo/profiles \ + -name '*.profraw' \ + -type f \ + -print -quit + )" - name: Verify instrumented binary shell: sh run: |