From fe78960fbf53f24927864f6e53b08bd43d0d4710 Mon Sep 17 00:00:00 2001 From: Abul Date: Mon, 10 Aug 2026 12:09:19 +0530 Subject: [PATCH 1/2] test --- .github/workflows/bootstrap.yml.disable | 81 +++++++++++++++++++ ...ith_dub.yml => build_with_dub.yml.disable} | 0 .../workflows/{main.yml => main.yml.disable} | 0 .../{nightlies.yml => nightlies.yml.disable} | 0 .github/workflows/perf.yml | 18 ++--- .../{release.yml => release.yml.disable} | 0 ...nable_cxx.yml => runnable_cxx.yml.disable} | 0 7 files changed, 87 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/bootstrap.yml.disable rename .github/workflows/{build_with_dub.yml => build_with_dub.yml.disable} (100%) rename .github/workflows/{main.yml => main.yml.disable} (100%) rename .github/workflows/{nightlies.yml => nightlies.yml.disable} (100%) rename .github/workflows/{release.yml => release.yml.disable} (100%) rename .github/workflows/{runnable_cxx.yml => runnable_cxx.yml.disable} (100%) diff --git a/.github/workflows/bootstrap.yml.disable b/.github/workflows/bootstrap.yml.disable new file mode 100644 index 000000000000..a66b1407a41c --- /dev/null +++ b/.github/workflows/bootstrap.yml.disable @@ -0,0 +1,81 @@ +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions + +name: Bootstrap +on: + pull_request: + branches: + - stable + paths-ignore: + - 'spec/**' + push: + branches: + - master + - stable + paths-ignore: + - 'spec/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + main: + strategy: + fail-fast: false + matrix: + version: [ + 2.076.1, 2.077.1, 2.078.3, 2.079.1, + 2.080.1, 2.081.2, 2.082.1, 2.083.1, 2.084.1, 2.085.1, 2.086.1, 2.087.1, 2.088.1, 2.089.1, + 2.090.1, 2.091.1, 2.092.1, 2.093.1, 2.094.2, 2.095.1, 2.096.1, 2.097.2, 2.098.1, 2.099.1, + 2.100.2, 2.101.2, 2.102.2, 2.103.1, 2.104.2, 2.105.3, 2.106.1, 2.107.1, 2.108.1, 2.109.1, + 2.110.0, 2.111.0 + ] + + name: Build with dmd-${{ matrix.version }} + runs-on: ubuntu-22.04 + timeout-minutes: 10 + env: + # for ci/run.sh: + OS_NAME: linux + MODEL: 64 + HOST_DMD: dmd-${{ matrix.version }} + # N is set dynamically below + FULL_BUILD: true + defaults: + run: + shell: bash + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 50 + + - name: Set environment variable N (parallelism) + run: echo "N=$(nproc)" >> $GITHUB_ENV + + - name: Install host compiler + run: ci/run.sh install_host_compiler + + - name: Set up repos + run: | + set -uexo pipefail + ref='${{ github.ref }}' + if [[ "$ref" =~ ^refs/pull/ ]]; then + # PR: clone the Phobos head with the same name as this DMD PR's target branch + # e.g., Phobos stable when targeting DMD stable + REPO_BRANCH="$GITHUB_BASE_REF" + elif [[ "$ref" =~ ^refs/(heads|tags)/(.*)$ ]]; then + # no PR: try to clone the Phobos head with the same name as this DMD head, falling back to master + # e.g., Phobos stable for a push to DMD stable, or Phobos v2.105.2 for DMD tag v2.105.2 + REPO_BRANCH="${BASH_REMATCH[2]}" + else + echo "Error: unexpected GitHub ref '$ref'" >&2 + exit 1 + fi + ci/run.sh setup_repos "$REPO_BRANCH" + + - name: Build dmd + run: ENABLE_RELEASE=0 ENABLE_DEBUG=0 ci/run.sh build 0 + + - name: Rebuild dmd + run: ENABLE_RELEASE=0 ENABLE_DEBUG=0 ci/run.sh rebuild diff --git a/.github/workflows/build_with_dub.yml b/.github/workflows/build_with_dub.yml.disable similarity index 100% rename from .github/workflows/build_with_dub.yml rename to .github/workflows/build_with_dub.yml.disable diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml.disable similarity index 100% rename from .github/workflows/main.yml rename to .github/workflows/main.yml.disable diff --git a/.github/workflows/nightlies.yml b/.github/workflows/nightlies.yml.disable similarity index 100% rename from .github/workflows/nightlies.yml rename to .github/workflows/nightlies.yml.disable diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 207d5949448e..2cbe941d751e 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -18,7 +18,7 @@ permissions: jobs: perf: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 timeout-minutes: 60 env: OS_NAME: linux @@ -80,22 +80,16 @@ jobs: ( cd "$dir/../phobos" && make -j$N MODEL=$MODEL ) } - # Rebuild dmd against the shared profile so that base and head got identical PGO guidance. - build_with_profile() { - local dir="$RUNNER_TEMP/$1/dmd" - ( cd "$dir" && generated/build HOST_DMD=$DMD MODEL=$MODEL \ - ENABLE_RELEASE=1 ENABLE_LTO=1 \ - DFLAGS="-fprofile-instr-use=$profile -wi" -j$N --force ) - } - setup_ref "${{ steps.refs.outputs.base }}" base setup_ref "${{ steps.refs.outputs.head }}" head - # Train PGO once, then reuse the profile for both refs. + # Train PGO on base. dmd-pgo's last step already rebuilds base with the + # merged profile, so only head needs a rebuild against it. ( cd "$RUNNER_TEMP/base/dmd" && generated/build HOST_DMD=$DMD MODEL=$MODEL dmd-pgo -j$N --force ) cp "$RUNNER_TEMP/base/dmd/$built/dmd_profdata/merged.data" "$profile" - build_with_profile base - build_with_profile head + ( cd "$RUNNER_TEMP/head/dmd" && generated/build HOST_DMD=$DMD MODEL=$MODEL \ + ENABLE_RELEASE=1 ENABLE_LTO=1 \ + DFLAGS="-fprofile-instr-use=$profile -wi" -j$N --force ) deactivate - name: Measure diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml.disable similarity index 100% rename from .github/workflows/release.yml rename to .github/workflows/release.yml.disable diff --git a/.github/workflows/runnable_cxx.yml b/.github/workflows/runnable_cxx.yml.disable similarity index 100% rename from .github/workflows/runnable_cxx.yml rename to .github/workflows/runnable_cxx.yml.disable From 3b445978525c0485da8965b8de9d06ce31695236 Mon Sep 17 00:00:00 2001 From: Abul Date: Mon, 10 Aug 2026 13:09:15 +0530 Subject: [PATCH 2/2] test 2 --- tools/perfrunner/source/app.d | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/perfrunner/source/app.d b/tools/perfrunner/source/app.d index ad75cd72f377..34a485217b72 100644 --- a/tools/perfrunner/source/app.d +++ b/tools/perfrunner/source/app.d @@ -2,6 +2,7 @@ module app; import std.file : mkdirRecurse, tempDir, write; import std.getopt : getopt; +import std.parallelism : task; import std.path : buildPath, dirName; import std.stdio : stderr, writeln; @@ -59,8 +60,11 @@ int main(string[] args) // Resolved once so both refs compile vibe.d with the same flags. auto vibedFlags = describeFlags(vibedDir, baseDmd); - auto base = measure(baseDmd, workload, basePhobos, vibedRoot, vibedFlags, tmp, "base"); + // The two sides share nothing, so measure them in parallel. + auto baseTask = task!measure(baseDmd, workload, basePhobos, vibedRoot, vibedFlags, tmp, "base"); + baseTask.executeInNewThread(); auto head = measure(headDmd, workload, headPhobos, vibedRoot, vibedFlags, tmp, "head"); + auto base = baseTask.yieldForce; MetricResult[] metrics; foreach (def; initials)