Skip to content

[build] ensure benchmark toolchain tests use the just built libraries #38158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

edymtt
Copy link
Contributor

@edymtt edymtt commented Jun 29, 2021

The binaries would prefer the dylibs shipped in the OS to the ones just built -- employ DYLD_LIBRARY_PATH to pick up the latter instead.

The main purpose of this change is to unblock the generation of nightly
toolchains.

Addresses rdar://79788142

@edymtt
Copy link
Contributor Author

edymtt commented Jun 29, 2021

@swift-ci please smoke test

@edymtt
Copy link
Contributor Author

edymtt commented Jun 29, 2021

@swift-ci please build toolchain

@shahmishal
Copy link
Member

shahmishal commented Jun 29, 2021

I would recommend reverting my change to skip building benchmark in this PR. Otherwise, build toolchain job will not provide valid testing.

@edymtt
Copy link
Contributor Author

edymtt commented Jun 29, 2021

#38159
@swift-ci please smoke test

@edymtt edymtt force-pushed the use_just_build_libraries_for_benchmark_toolchain_tests branch from 7c730a9 to 7a12ffe Compare June 29, 2021 19:44
@edymtt
Copy link
Contributor Author

edymtt commented Jun 29, 2021

@swift-ci please smoke test

@edymtt
Copy link
Contributor Author

edymtt commented Jun 29, 2021

@swift-ci please build toolchain

@swift-ci
Copy link
Contributor

Linux Toolchain (Ubuntu 16.04)
Download Toolchain
Git Sha - 7a12ffe10f4c9b4cfee85d89ea1788e50a8d10d9

Install command
tar zxf swift-PR-38158-615-ubuntu16.04.tar.gz
More info

@edymtt
Copy link
Contributor Author

edymtt commented Jun 29, 2021

@swift-ci please smoke test macOS

@edymtt
Copy link
Contributor Author

edymtt commented Jun 29, 2021

@swift-ci please test Windows

edymtt added 3 commits July 5, 2021 12:00
The binaries would prefer the dylibs shipped in the OS to the ones just built -- employ `DYLD_LIBRARY_PATH` to pick up the latter instead.

The main purpose of this change is to unblock the generation of nightly
toolchains.

Addresses rdar://79788142
…-benchmark-test-79788142"

This reverts commit 8822ccc, reversing
changes made to d477efb.
…8142"

This reverts commit e059d5c, reversing
changes made to f1ebf6c.
@edymtt edymtt force-pushed the use_just_build_libraries_for_benchmark_toolchain_tests branch from 7a12ffe to db88d43 Compare July 5, 2021 19:02
@edymtt edymtt removed the request for review from beccadax July 5, 2021 19:03
@edymtt
Copy link
Contributor Author

edymtt commented Jul 6, 2021

@swift-ci please smoke test

@edymtt
Copy link
Contributor Author

edymtt commented Jul 6, 2021

@swift-ci please build toolchain

@swift-ci
Copy link
Contributor

swift-ci commented Jul 6, 2021

Linux Toolchain (Ubuntu 16.04)
Download Toolchain
Git Sha - db88d43

Install command
tar zxf swift-PR-38158-621-ubuntu16.04.tar.gz
More info

@swift-ci
Copy link
Contributor

swift-ci commented Jul 6, 2021

macOS Toolchain
Download Toolchain
Git Sha - db88d43

Install command
tar -zxf swift-PR-38158-1042-osx.tar.gz --directory ~/

@edymtt
Copy link
Contributor Author

edymtt commented Jul 6, 2021

The benchmark tests are being executed without errors

+ env DYLD_LIBRARY_PATH=/Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/intermediate-install/macosx-x86_64/Library/Developer/Toolchains/swift-PR-38158-1042.xctoolchain/usr/lib/swift/macosx /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/benchmarks-macosx-x86_64/bin/Benchmark_Onone --num-iters=1 XorLoop
#,TEST,SAMPLES,MIN(μs),MAX(μs),MEAN(μs),SD(μs),MEDIAN(μs)
1023,XorLoop,86,11182,12584,11503,386,11300

Total performance tests executed: 1
+ env DYLD_LIBRARY_PATH=/Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/intermediate-install/macosx-x86_64/Library/Developer/Toolchains/swift-PR-38158-1042.xctoolchain/usr/lib/swift/macosx /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/benchmarks-macosx-x86_64/bin/Benchmark_O --num-iters=1 XorLoop
#,TEST,SAMPLES,MIN(μs),MAX(μs),MEAN(μs),SD(μs),MEDIAN(μs)
1023,XorLoop,200,381,451,384,11,381

Total performance tests executed: 1
+ env DYLD_LIBRARY_PATH=/Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/intermediate-install/macosx-x86_64/Library/Developer/Toolchains/swift-PR-38158-1042.xctoolchain/usr/lib/swift/macosx /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/benchmarks-macosx-x86_64/bin/Benchmark_Osize --num-iters=1 XorLoop
#,TEST,SAMPLES,MIN(μs),MAX(μs),MEAN(μs),SD(μs),MEDIAN(μs)
1023,XorLoop,200,399,516,415,24,411

Total performance tests executed: 1

Copy link
Contributor

@gottesmm gottesmm left a comment

Choose a reason for hiding this comment

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

LGTM with these small changes.

@edymtt
Copy link
Contributor Author

edymtt commented Jul 6, 2021

@swift-ci please python lint

@edymtt
Copy link
Contributor Author

edymtt commented Jul 6, 2021

@swift-ci please smoke test

@edymtt
Copy link
Contributor Author

edymtt commented Jul 6, 2021

@swift-ci please build toolchain

@swift-ci
Copy link
Contributor

swift-ci commented Jul 7, 2021

Linux Toolchain (Ubuntu 16.04)
Download Toolchain
Git Sha - 0bccd8d

Install command
tar zxf swift-PR-38158-624-ubuntu16.04.tar.gz
More info

@swift-ci
Copy link
Contributor

swift-ci commented Jul 7, 2021

macOS Toolchain
Download Toolchain
Git Sha - 0bccd8d

Install command
tar -zxf swift-PR-38158-1048-osx.tar.gz --directory ~/

@edymtt
Copy link
Contributor Author

edymtt commented Jul 7, 2021

Checked that the new run executed the benchmark tests as expected

+ env DYLD_LIBRARY_PATH=/Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/intermediate-install/macosx-x86_64/Lib
rary/Developer/Toolchains/swift-PR-38158-1048.xctoolchain/usr/lib/swift/macosx /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-m
ain/buildbot_osx/benchmarks-macosx-x86_64/bin/Benchmark_Onone --num-iters=1 XorLoop
#,TEST,SAMPLES,MIN(μs),MAX(μs),MEAN(μs),SD(μs),MEDIAN(μs)
1023,XorLoop,86,11183,12257,11302,210,11227

Total performance tests executed: 1
+ env DYLD_LIBRARY_PATH=/Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/intermediate-install/macosx-x86_64/Lib
rary/Developer/Toolchains/swift-PR-38158-1048.xctoolchain/usr/lib/swift/macosx /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-m
ain/buildbot_osx/benchmarks-macosx-x86_64/bin/Benchmark_O --num-iters=1 XorLoop
#,TEST,SAMPLES,MIN(μs),MAX(μs),MEAN(μs),SD(μs),MEDIAN(μs)
1023,XorLoop,200,381,912,387,38,383

Total performance tests executed: 1
+ env DYLD_LIBRARY_PATH=/Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-main/buildbot_osx/intermediate-install/macosx-x86_64/Lib
rary/Developer/Toolchains/swift-PR-38158-1048.xctoolchain/usr/lib/swift/macosx /Users/buildnode/jenkins/workspace/swift-PR-toolchain-osx/branch-m
ain/buildbot_osx/benchmarks-macosx-x86_64/bin/Benchmark_Osize --num-iters=1 XorLoop
#,TEST,SAMPLES,MIN(μs),MAX(μs),MEAN(μs),SD(μs),MEDIAN(μs)
1023,XorLoop,200,399,420,400,3,400

Total performance tests executed: 1

@edymtt
Copy link
Contributor Author

edymtt commented Jul 7, 2021

For some reason I don't fully understand, the standalone python lint seems to check more files that the one run as part of macOS tests and detect issues on a file not changed by this PR

15:09:29 + ./utils/python_lint.py
15:09:36 ./test/attr/Inputs/access-note-gen.py:28:10: E127 continuation line over-indented for visual indent
15:09:36 ./test/attr/Inputs/access-note-gen.py:29:10: E127 continuation line over-indented for visual indent

Since this will not affect regular CI runs, I will return to this at a later time.

@edymtt edymtt merged commit 3504310 into swiftlang:main Jul 7, 2021
edymtt added a commit to edymtt/swift that referenced this pull request Jul 7, 2021
The binaries would prefer the libraries shipped in the OS to the ones just built -- employ `DYLD_LIBRARY_PATH` to pick up the latter instead.

The main purpose of this change is to unblock the generation of nightly
toolchains.

Addresses rdar://79788142

Cherry picked from commit 3504310, swiftlang#38158
@edymtt edymtt deleted the use_just_build_libraries_for_benchmark_toolchain_tests branch July 8, 2021 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants