Skip to content

Commit

Permalink
Use artifacts layout in place of bin dir
Browse files Browse the repository at this point in the history
  • Loading branch information
jashook committed Nov 18, 2019
1 parent 2b4b6d5 commit cd36d15
Show file tree
Hide file tree
Showing 83 changed files with 266 additions and 260 deletions.
4 changes: 2 additions & 2 deletions docs/coreclr/building/android.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ To compile for arm64, run:
CONFIG_DIR=`realpath cross/android/arm64` ROOTFS_DIR=`realpath cross/android-rootfs/toolchain/arm64/sysroot` ./build.sh cross arm64 skipgenerateversion skipmscorlib cmakeargs -DENABLE_LLDBPLUGIN=0
```

The resulting binaries will be found in `bin/Product/Linux.BuildArch.BuildType/`
The resulting binaries will be found in `artifacts/Product/Linux.BuildArch.BuildType/`

Running the PAL tests on Android
--------------------------------
Expand All @@ -42,7 +42,7 @@ You can run the PAL tests on an Android device. To run the tests, you first copy

To copy the PAL tests over to an Android phone:
```
adb push bin/obj/Linux.arm64.Debug/src/pal/tests/palsuite/ /data/local/tmp/coreclr/src/pal/tests/palsuite
adb push artifacts/obj/Linux.arm64.Debug/src/pal/tests/palsuite/ /data/local/tmp/coreclr/src/pal/tests/palsuite
adb push cross/android/toolchain/arm64/sysroot/usr/lib/libintl.so /data/local/tmp/coreclr/lib
adb push cross/android/toolchain/arm64/sysroot/usr/lib/libandroid-support.so /data/local/tmp/coreclr/lib/
adb push cross/android/toolchain/arm64/sysroot/usr/lib/libandroid-glob.so /data/local/tmp/coreclr/lib/
Expand Down
22 changes: 11 additions & 11 deletions docs/coreclr/building/cross-building.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ And with:

ben@ubuntu ~/git/coreclr/ $ ROOTFS_DIR=/home/ben/coreclr-cross/arm ./build.sh arm debug verbose cross

As usual, the resulting binaries will be found in `bin/Product/BuildOS.BuildArch.BuildType/`
As usual, the resulting binaries will be found in `artifacts/Product/BuildOS.BuildArch.BuildType/`


Compiling System.Private.CoreLib for ARM Linux
Expand Down Expand Up @@ -134,11 +134,11 @@ To build System.Private.CoreLib for Linux, run the following command:
lgs@ubuntu ~/git/coreclr/ $ build.sh arm debug verbose
```

The output is at bin/Product/<BuildOS>.arm.Debug/System.Private.CoreLib.dll.
The output is at artifacts/Product/<BuildOS>.arm.Debug/System.Private.CoreLib.dll.

```
lgs@ubuntu ~/git/coreclr/ $ file ./bin/Product/Linux.arm.Debug/System.Private.CoreLib.dll
./bin/Product/Linux.arm.Debug/System.Private.CoreLib.dll: PE32 executable (DLL)
lgs@ubuntu ~/git/coreclr/ $ file ./artifacts/Product/Linux.arm.Debug/System.Private.CoreLib.dll
./artifacts/Product/Linux.arm.Debug/System.Private.CoreLib.dll: PE32 executable (DLL)
(console) ARMv7 Thumb Mono/.NET assembly, for MS Windows
```

Expand All @@ -164,21 +164,21 @@ prajwal@ubuntu ~/coreclr $ ./tests/scripts/arm32_ci_script.sh \
--skipTests
```

The Linux ARM Emulator is based on soft floating point and thus the native binaries in coreclr are built for the armel architecture. The coreclr binaries generated by the above command (native and System.Private.CoreLib) can be found at `~/coreclr/bin/Product/Linux.armel.Release`.
The Linux ARM Emulator is based on soft floating point and thus the native binaries in coreclr are built for the armel architecture. The coreclr binaries generated by the above command (native and System.Private.CoreLib) can be found at `~/coreclr/artifacts/Product/Linux.armel.Release`.

To build libcoreclr and System.Private.CoreLib, and run selected coreclr unit tests on the emulator, do the following:
* Download the latest Coreclr unit test binaries (or build on Windows) from here: [Debug](http://dotnet-ci.cloudapp.net/job/dotnet_coreclr/job/master/job/debug_windows_nt_bld/lastSuccessfulBuild/artifact/bin/tests/tests.zip) and [Release](http://dotnet-ci.cloudapp.net/job/dotnet_coreclr/job/master/job/release_windows_nt_bld/lastSuccessfulBuild/artifact/bin/tests/tests.zip).
Setup the binaries at `~/coreclr/bin/tests/Windows_NT.x64.Release`.
* Download the latest Coreclr unit test binaries (or build on Windows) from here: [Debug](http://dotnet-ci.cloudapp.net/job/dotnet_coreclr/job/master/job/debug_windows_nt_bld/lastSuccessfulBuild/artifact/artifacts/tests/tests.zip) and [Release](http://dotnet-ci.cloudapp.net/job/dotnet_coreclr/job/master/job/release_windows_nt_bld/lastSuccessfulBuild/artifact/artifacts/tests/tests.zip).
Setup the binaries at `~/coreclr/artifacts/tests/Windows_NT.x64.Release`.
* Build corefx binaries for the Emulator as given [here](https://github.com/dotnet/corefx/blob/master/Documentation/building/cross-building.md#building-corefx-for-linux-arm-emulator).
Setup these binaries at `~/corefx/bin/Linux.arm-softfp.Release`, `~/corefx/bin/Linux.AnyCPU.Release`, `~/corefx/bin/Unix.AnyCPU.Release`, and `~/corefx/bin/AnyOS.AnyCPU.Release`.
Setup these binaries at `~/corefx/artifacts/Linux.arm-softfp.Release`, `~/corefx/artifacts/Linux.AnyCPU.Release`, `~/corefx/artifacts/Unix.AnyCPU.Release`, and `~/corefx/artifacts/AnyOS.AnyCPU.Release`.
* Run the following command (change value of `--testDirFile` argument to the file containing your selection of tests):
```
prajwal@ubuntu ~/coreclr $ ./tests/scripts/arm32_ci_script.sh \
--emulatorPath=/opt/linux-arm-emulator \
--mountPath=/opt/linux-arm-emulator-root \
--buildConfig=Release \
--testRootDir=~/coreclr/bin/tests/Windows_NT.x64.Release \
--coreFxNativeBinDir=~/corefx/bin/Linux.arm-softfp.Release \
--coreFxBinDir="~/corefx/bin/Linux.AnyCPU.Release;~/corefx/bin/Unix.AnyCPU.Release;~/corefx/bin/AnyOS.AnyCPU.Release" \
--testRootDir=~/coreclr/artifacts/tests/Windows_NT.x64.Release \
--coreFxNativeBinDir=~/corefx/artifacts/Linux.arm-softfp.Release \
--coreFxBinDir="~/corefx/artifacts/Linux.AnyCPU.Release;~/corefx/artifacts/Unix.AnyCPU.Release;~/corefx/artifacts/AnyOS.AnyCPU.Release" \
--testDirFile=~/coreclr/tests/testsRunningInsideARM.txt
```
4 changes: 2 additions & 2 deletions docs/coreclr/building/debugging-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Debugging CoreCLR on Windows
============================

1. Perform a build of the repo.
2. Open solution \<reporoot\>\bin\obj\Windows_NT.\<platform\>.\<configuration\>\CoreCLR.sln in Visual Studio. \<platform\> and \<configuration\> are based
2. Open solution \<reporoot\>\artifacts\obj\Windows_NT.\<platform\>.\<configuration\>\CoreCLR.sln in Visual Studio. \<platform\> and \<configuration\> are based
on type of build you did. By default they are 'x64' and 'Debug'.
3. Right-click the INSTALL project and choose ‘Set as StartUp Project’
4. Bring up the properties page for the INSTALL project
Expand Down Expand Up @@ -39,7 +39,7 @@ Only lldb is supported by SOS. Gdb can be used to debug the coreclr code but wit

1. Perform a build of the coreclr repo.
2. Install the corefx managed assemblies to the binaries directory.
3. cd to build's binaries: `cd ~/coreclr/bin/Product/Linux.x64.Debug`
3. cd to build's binaries: `cd ~/coreclr/artifacts/Product/Linux.x64.Debug`
4. Start lldb: `lldb-3.9 corerun HelloWorld.exe linux`
6. Launch program: `process launch -s`
7. To stop annoying breaks on SIGUSR1/SIGUSR2 signals used by the runtime run: `process handle -s false SIGUSR1 SIGUSR2`
Expand Down
12 changes: 6 additions & 6 deletions docs/coreclr/building/freebsd-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ LLDB_LIB_DIR=/usr/local/llvm37/lib LLDB_INCLUDE_DIR=/usr/local/llvm37/include ./
Run tests:

```sh
./src/pal/tests/palsuite/runpaltests.sh $PWD/bin/obj/FreeBSD.x64.Debug $PWD/bin/paltestout
./src/pal/tests/palsuite/runpaltests.sh $PWD/artifacts/obj/FreeBSD.x64.Debug $PWD/artifacts/paltestout
```

Git Setup
Expand All @@ -78,7 +78,7 @@ janhenke@freebsd-frankfurt:~/git/coreclr % ./build.sh clang3.6
```


After the build is completed, there should some files placed in `bin/Product/FreeBSD.x64.Debug`. The ones we are interested in are:
After the build is completed, there should some files placed in `artifacts/Product/FreeBSD.x64.Debug`. The ones we are interested in are:

* `corerun`: The command line host. This program loads and starts the CoreCLR runtime and passes the managed program you want to run to it.
* `libcoreclr.so`: The CoreCLR runtime itself.
Expand All @@ -88,16 +88,16 @@ In order to keep everything tidy, let's create a new directory for the runtime a

```sh
janhenke@freebsd-frankfurt:~/git/coreclr % mkdir -p ~/coreclr-demo/runtime
janhenke@freebsd-frankfurt:~/git/coreclr % cp bin/Product/FreeBSD.x64.Debug/corerun ~/coreclr-demo/runtime
janhenke@freebsd-frankfurt:~/git/coreclr % cp bin/Product/FreeBSD.x64.Debug/libcoreclr*.so ~/coreclr-demo/runtime
janhenke@freebsd-frankfurt:~/git/coreclr % cp artifacts/Product/FreeBSD.x64.Debug/corerun ~/coreclr-demo/runtime
janhenke@freebsd-frankfurt:~/git/coreclr % cp artifacts/Product/FreeBSD.x64.Debug/libcoreclr*.so ~/coreclr-demo/runtime
```

Build the Framework Native Components
======================================

```sh
janhenke@freebsd-frankfurt:~/git/corefx$ ./build-native.sh
janhenke@freebsd-frankfurt:~/git/corefx$ cp bin/FreeBSD.x64.Debug/Native/*.so ~/coreclr-demo/runtime
janhenke@freebsd-frankfurt:~/git/corefx$ cp artifacts/FreeBSD.x64.Debug/Native/*.so ~/coreclr-demo/runtime
```

Build the Framework Managed Components
Expand Down Expand Up @@ -251,7 +251,7 @@ This can be done after a clean build, without any other dependencies.
From the coreclr project directory:

```sh
janhenke@freebsd-frankfurt:~/coreclr % ./src/pal/tests/palsuite/runpaltests.sh ~/coreclr/bin/obj/FreeBSD.x64.Debug ~/coreclr/bin/paltestout
janhenke@freebsd-frankfurt:~/coreclr % ./src/pal/tests/palsuite/runpaltests.sh ~/coreclr/artifacts/obj/FreeBSD.x64.Debug ~/coreclr/artifacts/paltestout
```

This should run all the tests associated with the PAL.
Expand Down
6 changes: 3 additions & 3 deletions docs/coreclr/building/linux-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ To build the runtime on Linux, run build.sh from the root of the coreclr reposit
./build.sh
```

After the build is completed, there should some files placed in `bin/Product/Linux.x64.Debug`. The ones we are interested in are:
After the build is completed, there should some files placed in `artifacts/Product/Linux.x64.Debug`. The ones we are interested in are:

* `corerun`: The command line host. This program loads and starts the CoreCLR runtime and passes the managed program you want to run to it.
* `libcoreclr.so`: The CoreCLR runtime itself.
Expand All @@ -149,14 +149,14 @@ The Core_Root folder will have the built binaries, from `build.sh` and it will a
./build-test.sh generatelayoutonly
```

After the build is complete you will be able to find the output in the `bin/tests/Linux.x64.Debug/Tests/Core_Root` folder.
After the build is complete you will be able to find the output in the `artifacts/tests/Linux.x64.Debug/Tests/Core_Root` folder.

Running a single test
===================

After `build-test.sh` is run, corerun from the Core_Root folder is ready to be run. This can be done by using the full absolute path to corerun, or by setting an environment variable to the Core_Root folder.

```sh
export CORE_ROOT=/home/dotnet-bot/coreclr/bin/tests/Linux.x64.Debug/Tests/Core_Root
export CORE_ROOT=/home/dotnet-bot/coreclr/artifacts/tests/Linux.x64.Debug/Tests/Core_Root
$CORE_ROOT/corerun hello_world.dll
```
8 changes: 4 additions & 4 deletions docs/coreclr/building/netbsd-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ Build CoreFX native x64 Debug and the work (build) dir is in /usr/pkgsrc/wip/cor
cd /usr/pkgsrc/wip/corefx-git && make
```

Build CoreCLR Debug x64 on Linux and copy System.Private.CoreLib.dll from ./bin/Product/Linux.x64.Debug/System.Private.CoreLib.dll to NetBSD machine under /usr/pkg/CoreCLR:
Build CoreCLR Debug x64 on Linux and copy System.Private.CoreLib.dll from ./artifacts/Product/Linux.x64.Debug/System.Private.CoreLib.dll to NetBSD machine under /usr/pkg/CoreCLR:

```
./build.sh mscorlib Debug
```

Build CoreFX Debug x64 on Linux and copy bin/ to NetBSD machine under /public/bin:
Build CoreFX Debug x64 on Linux and copy artifacts/ to NetBSD machine under /public/bin:

```
./build-native.sh -os=NetBSD
Expand All @@ -124,6 +124,6 @@ $ pwd
$ ./run-test.sh \
--coreclr-bins /usr/pkg/CoreCLR/ \
--mscorlib-bins /usr/pkg/CoreCLR/ \
--corefx-tests /public/bin/tests/NetBSD.AnyCPU.Debug/ \
--corefx-native-bins ./bin/NetBSD.x64.Debug/Native/
--corefx-tests /public/artifacts/tests/NetBSD.AnyCPU.Debug/ \
--corefx-native-bins ./artifacts/NetBSD.x64.Debug/Native/
```
6 changes: 3 additions & 3 deletions docs/coreclr/building/osx-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ To Build CoreCLR, run build.sh from the root of the coreclr repo.
./build.sh
```

After the build has completed, there should some files placed in `bin/Product/OSX.x64.Debug`. The ones we are interested in are:
After the build has completed, there should some files placed in `artifacts/Product/OSX.x64.Debug`. The ones we are interested in are:

- `corerun`: The command line host. This program loads and starts the CoreCLR runtime and passes the managed program you want to run to it.
- `libcoreclr.dylib`: The CoreCLR runtime itself.
Expand All @@ -66,7 +66,7 @@ The Core_Root folder will have the built binaries, from `build.sh` and it will a
./build-test.sh generatelayoutonly
```

After the build is complete you will be able to find the output in the `bin/tests/OSX.x64.Debug/Tests/Core_Root` folder.
After the build is complete you will be able to find the output in the `artifacts/tests/OSX.x64.Debug/Tests/Core_Root` folder.

Running a single test
===================
Expand All @@ -75,6 +75,6 @@ After `build-test.sh` is run, corerun from the Core_Root folder is ready to be r
an environment variable to the Core_Root folder.

```sh
export CORE_ROOT=/path/to/coreclr/bin/tests/OSX.x64.Debug/Tests/Core_Root
export CORE_ROOT=/path/to/coreclr/artifacts/tests/OSX.x64.Debug/Tests/Core_Root
$CORE_ROOT/corerun hello_world.dll
```
4 changes: 2 additions & 2 deletions docs/coreclr/building/testing-with-corefx.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ To build CoreFX tests against a current, "live", version of CoreCLR, including w

For example:
```
f:\git\corefx> build.cmd -configuration Release -arch x64 -restore -build -buildtests -test /p:CoreCLROverridePath=f:\git\coreclr\bin\Product\Windows_NT.x64.Checked
f:\git\corefx> build.cmd -configuration Release -arch x64 -restore -build -buildtests -test /p:CoreCLROverridePath=f:\git\coreclr\artifacts\Product\Windows_NT.x64.Checked
```

Note that this will replace the coreclr used in the build, and because `-test` is passed, will also run the tests.
Expand All @@ -66,7 +66,7 @@ This creates a "testhost" directory with a subdirectory that includes the corecl
folder created in step #1.

```
f:\git\corefx> copy f:\git\coreclr\bin\Product\Windows_NT.x64.Checked\* f:\git\corefx\artifacts\bin\testhost\netcoreapp-Windows_NT-Release-x64\shared\Microsoft.NETCore.App\3.0.0
f:\git\corefx> copy f:\git\coreclr\artifacts\Product\Windows_NT.x64.Checked\* f:\git\corefx\artifacts\bin\testhost\netcoreapp-Windows_NT-Release-x64\shared\Microsoft.NETCore.App\3.0.0
```

3. Optionally, create a script that contains any environment variables you want to set when running each CoreFX test. Disabling TieredCompilation or setting a JIT stress mode is a common case. E.g.,
Expand Down
2 changes: 1 addition & 1 deletion docs/coreclr/building/unix-test-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Build CoreCLR on the Unix machine.

Run tests:

> `~/coreclr$ src/pal/tests/palsuite/runpaltests.sh ~/coreclr/bin/obj/Linux.x64.Debug`
> `~/coreclr$ src/pal/tests/palsuite/runpaltests.sh ~/coreclr/artifacts/obj/Linux.x64.Debug`
Test results will go into:

Expand Down
14 changes: 7 additions & 7 deletions docs/coreclr/building/viewing-jit-dumps.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ The first thing to do is setup the .NET Core app we want to dump. Here are the s
}
```

* After you've finished editing the code, run `dotnet restore` and `dotnet publish -c Release`. This should drop all of the binaries needed to run your app in `bin/Release/<configuration>/<rid>/publish`.
* After you've finished editing the code, run `dotnet restore` and `dotnet publish -c Release`. This should drop all of the binaries needed to run your app in `artifacts/Release/<configuration>/<rid>/publish`.
* Overwrite the CLR dlls with the ones you've built locally. If you're a fan of the command line, here are some shell commands for doing this:

```shell
# Windows
robocopy /e <coreclr path>\bin\Product\Windows_NT.<arch>.Release <app root>\bin\Release\netcoreapp3.0\<rid>\publish > NUL
copy /y <coreclr path>\bin\Product\Windows_NT.<arch>.Debug\clrjit.dll <app root>\bin\Release\netcoreapp3.0\<rid>\publish > NUL
robocopy /e <coreclr path>\artifacts\Product\Windows_NT.<arch>.Release <app root>\artifacts\Release\netcoreapp3.0\<rid>\publish > NUL
copy /y <coreclr path>\artifacts\Product\Windows_NT.<arch>.Debug\clrjit.dll <app root>\artifacts\Release\netcoreapp3.0\<rid>\publish > NUL

# Unix
cp -rT <coreclr path>/bin/Product/<OS>.<arch>.Release <app root>/bin/Release/netcoreapp3.0/<rid>/publish
cp <coreclr path>/bin/Product/<OS>.<arch>.Debug/libclrjit.so <app root>/bin/Release/netcoreapp3.0/<rid>/publish
cp -rT <coreclr path>/artifacts/Product/<OS>.<arch>.Release <app root>/artifacts/Release/netcoreapp3.0/<rid>/publish
cp <coreclr path>/artifacts/Product/<OS>.<arch>.Debug/libclrjit.so <app root>/artifacts/Release/netcoreapp3.0/<rid>/publish
```

* Set the configuration knobs you need (see below) and run your published app. The info you want should be dumped to stdout.
Expand Down Expand Up @@ -161,7 +161,7 @@ Below are some of the most useful `COMPlus` variables. Where {method-list} is sp
If you followed the tutorial above and ran the sample app, you may be wondering why the disassembly for methods like `Substring` didn't show up in the output. This is because `Substring` lives in mscorlib, which (by default) is compiled ahead-of-time to a native image via [crossgen](../building/crossgen.md). Telling crossgen to dump the info works slightly differently.

* First, perform a debug build of the native parts of the repo: `build skipmscorlib skiptests`.
* This should produce the binaries for crossgen in `bin/Product/<OS>.<arch>.Debug`.
* This should produce the binaries for crossgen in `artifacts/Product/<OS>.<arch>.Debug`.
* Next, set the appropriate configuration knob for the info you want to dump. Usually, this is just the same as the corresponding JIT knob, except prefixed with `Ngen`; for example, to show the disassembly listing of a particular method you would `set COMPlus_NgenDisasm=Foo`.
* Run crossgen on the assembly you want to dump: `crossgen MyLibrary.dll`
* If you want to see the output of crossgen specifically for mscorlib, invoke `build skipnative skiptests` from the repo root. The dumps should be written to a file in `bin/Logs` that you can just view.
* If you want to see the output of crossgen specifically for mscorlib, invoke `build skipnative skiptests` from the repo root. The dumps should be written to a file in `artifacts/Logs` that you can just view.
4 changes: 2 additions & 2 deletions docs/coreclr/building/windows-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ the base of the repository.
[Lots of build spew]
Product binaries are available at C:\git\coreclr\bin\Product\Windows_NT.x64.debug
Test binaries are available at C:\git\coreclr\bin\tests\Windows_NT.x64.debug
Product binaries are available at C:\git\coreclr\artifacts\Product\Windows_NT.x64.debug
Test binaries are available at C:\git\coreclr\artifacts\tests\Windows_NT.x64.debug
```

As shown above, the product will be placed in
Expand Down
Loading

0 comments on commit cd36d15

Please # to comment.