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