Skip to content

Commit 7f2b3ee

Browse files
link-sample tasks do not use the source archive
1 parent f2be43a commit 7f2b3ee

File tree

9 files changed

+29
-91
lines changed

9 files changed

+29
-91
lines changed

.evergreen/generated_configs/legacy-config.yml

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -743,19 +743,13 @@ tasks:
743743
env DEBUG="ON" SRV="OFF" bash .evergreen/scripts/compile.sh
744744
- func: upload-build
745745
- name: link-with-cmake
746-
depends_on:
747-
name: make-release-archive
748-
variant: releng
749746
commands:
750747
- func: fetch-det
751748
- func: bootstrap-mongo-orchestration
752749
- func: link sample program
753750
vars:
754751
BUILD_SAMPLE_WITH_CMAKE: 1
755752
- name: link-with-cmake-ssl
756-
depends_on:
757-
name: make-release-archive
758-
variant: releng
759753
commands:
760754
- func: fetch-det
761755
- func: bootstrap-mongo-orchestration
@@ -764,9 +758,6 @@ tasks:
764758
BUILD_SAMPLE_WITH_CMAKE: 1
765759
ENABLE_SSL: 1
766760
- name: link-with-cmake-snappy
767-
depends_on:
768-
name: make-release-archive
769-
variant: releng
770761
commands:
771762
- func: fetch-det
772763
- func: bootstrap-mongo-orchestration
@@ -775,19 +766,13 @@ tasks:
775766
BUILD_SAMPLE_WITH_CMAKE: 1
776767
ENABLE_SNAPPY: 'ON'
777768
- name: link-with-cmake-mac
778-
depends_on:
779-
name: make-release-archive
780-
variant: releng
781769
commands:
782770
- func: fetch-det
783771
- func: bootstrap-mongo-orchestration
784772
- func: link sample program
785773
vars:
786774
BUILD_SAMPLE_WITH_CMAKE: 1
787775
- name: link-with-cmake-deprecated
788-
depends_on:
789-
name: make-release-archive
790-
variant: releng
791776
commands:
792777
- func: fetch-det
793778
- func: bootstrap-mongo-orchestration
@@ -796,9 +781,6 @@ tasks:
796781
BUILD_SAMPLE_WITH_CMAKE: 1
797782
BUILD_SAMPLE_WITH_CMAKE_DEPRECATED: 1
798783
- name: link-with-cmake-ssl-deprecated
799-
depends_on:
800-
name: make-release-archive
801-
variant: releng
802784
commands:
803785
- func: fetch-det
804786
- func: bootstrap-mongo-orchestration
@@ -808,9 +790,6 @@ tasks:
808790
BUILD_SAMPLE_WITH_CMAKE_DEPRECATED: 1
809791
ENABLE_SSL: 1
810792
- name: link-with-cmake-snappy-deprecated
811-
depends_on:
812-
name: make-release-archive
813-
variant: releng
814793
commands:
815794
- func: fetch-det
816795
- func: bootstrap-mongo-orchestration
@@ -820,9 +799,6 @@ tasks:
820799
BUILD_SAMPLE_WITH_CMAKE_DEPRECATED: 1
821800
ENABLE_SNAPPY: 'ON'
822801
- name: link-with-cmake-mac-deprecated
823-
depends_on:
824-
name: make-release-archive
825-
variant: releng
826802
commands:
827803
- func: fetch-det
828804
- func: bootstrap-mongo-orchestration
@@ -831,17 +807,11 @@ tasks:
831807
BUILD_SAMPLE_WITH_CMAKE: 1
832808
BUILD_SAMPLE_WITH_CMAKE_DEPRECATED: 1
833809
- name: link-with-cmake-windows
834-
depends_on:
835-
name: make-release-archive
836-
variant: releng
837810
commands:
838811
- func: fetch-det
839812
- func: bootstrap-mongo-orchestration
840813
- func: link sample program MSVC
841814
- name: link-with-cmake-windows-ssl
842-
depends_on:
843-
name: make-release-archive
844-
variant: releng
845815
commands:
846816
- func: fetch-det
847817
- func: bootstrap-mongo-orchestration
@@ -851,71 +821,44 @@ tasks:
851821
vars:
852822
ENABLE_SSL: 1
853823
- name: link-with-cmake-windows-snappy
854-
depends_on:
855-
name: make-release-archive
856-
variant: releng
857824
commands:
858825
- func: fetch-det
859826
- func: bootstrap-mongo-orchestration
860827
- func: link sample program MSVC
861828
vars:
862829
ENABLE_SNAPPY: 'ON'
863830
- name: link-with-cmake-mingw
864-
depends_on:
865-
name: make-release-archive
866-
variant: releng
867831
commands:
868832
- func: fetch-det
869833
- func: bootstrap-mongo-orchestration
870834
- func: link sample program mingw
871835
- name: link-with-pkg-config
872-
depends_on:
873-
name: make-release-archive
874-
variant: releng
875836
commands:
876837
- func: fetch-det
877838
- func: bootstrap-mongo-orchestration
878839
- func: link sample program
879840
- name: link-with-pkg-config-mac
880-
depends_on:
881-
name: make-release-archive
882-
variant: releng
883841
commands:
884842
- func: fetch-det
885843
- func: bootstrap-mongo-orchestration
886844
- func: link sample program
887845
- name: link-with-pkg-config-ssl
888-
depends_on:
889-
name: make-release-archive
890-
variant: releng
891846
commands:
892847
- func: fetch-det
893848
- func: bootstrap-mongo-orchestration
894849
- func: link sample program
895850
vars:
896851
ENABLE_SSL: 1
897852
- name: link-with-bson
898-
depends_on:
899-
name: make-release-archive
900-
variant: releng
901853
commands:
902854
- func: link sample program bson
903855
- name: link-with-bson-mac
904-
depends_on:
905-
name: make-release-archive
906-
variant: releng
907856
commands:
908857
- func: link sample program bson
909858
- name: link-with-bson-windows
910-
depends_on:
911-
name: make-release-archive
912-
variant: releng
913859
commands:
914860
- func: link sample program MSVC bson
915861
- name: link-with-bson-mingw
916-
depends_on:
917-
name: make-release-archive
918-
variant: releng
919862
commands:
920863
- func: link sample program mingw bson
921864
- name: debian-package-build

.evergreen/legacy_config_generator/evergreen_config_lib/tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def __init__(
171171

172172
super().__init__(
173173
task_name=task_name,
174-
depends_on=[OD([("name", "make-release-archive"), ("variant", "releng")])],
174+
depends_on=[],
175175
commands=bootstrap_commands + list(suffix_commands),
176176
)
177177

.evergreen/scripts/link-sample-program-bson.sh

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ DIR=$(dirname $0)
1414
CMAKE=$(find_cmake_latest)
1515
. $DIR/check-symlink.sh
1616

17-
if command -v gtar 2>/dev/null; then
18-
TAR=gtar
19-
else
20-
TAR=tar
21-
fi
22-
2317
# Get the kernel name, lowercased
2418
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
2519
echo "OS: $OS"
@@ -35,27 +29,30 @@ else
3529
fi
3630

3731
SRCROOT=`pwd`
32+
SCRATCH_DIR=$(pwd)/.scratch
33+
rm -rf "$SCRATCH_DIR"
34+
mkdir -p "$SCRATCH_DIR"
35+
cp -r -- "$SRCROOT"/* "$SCRATCH_DIR"
3836

39-
BUILD_DIR=$(pwd)/build-dir
37+
BUILD_DIR=$SCRATCH_DIR/build-dir
4038
rm -rf $BUILD_DIR
4139
mkdir $BUILD_DIR
4240

43-
INSTALL_DIR=$(pwd)/install-dir
41+
INSTALL_DIR=$SCRATCH_DIR/install-dir
4442
rm -rf $INSTALL_DIR
4543
mkdir -p $INSTALL_DIR
4644

4745
cd $BUILD_DIR
48-
$TAR xf ../../mongoc.tar.gz -C . --strip-components=1
4946

5047
if [ "$LINK_STATIC" ]; then
5148
# Our CMake system builds shared and static by default.
52-
$CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DENABLE_TESTS=OFF .
53-
$CMAKE --build .
54-
$CMAKE --build . --target install
49+
$CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DENABLE_TESTS=OFF "$SCRATCH_DIR"
50+
$CMAKE --build . --parallel
51+
$CMAKE --build . --parallel --target install
5552
else
56-
$CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DENABLE_TESTS=OFF -DENABLE_STATIC=OFF .
57-
$CMAKE --build .
58-
$CMAKE --build . --target install
53+
$CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DENABLE_TESTS=OFF -DENABLE_STATIC=OFF "$SCRATCH_DIR"
54+
$CMAKE --build . --parallel
55+
$CMAKE --build . --parallel --target install
5956

6057
set +o xtrace
6158

@@ -160,7 +157,7 @@ if [ "$BUILD_SAMPLE_WITH_CMAKE" ]; then
160157

161158
cd $EXAMPLE_DIR
162159
$CMAKE -DCMAKE_PREFIX_PATH=$INSTALL_DIR/lib/cmake .
163-
$CMAKE --build .
160+
$CMAKE --build . --parallel
164161
else
165162
# Test our pkg-config file.
166163
export PKG_CONFIG_PATH=$INSTALL_DIR/lib/pkgconfig

.evergreen/scripts/link-sample-program-mingw-bson.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ mkdir %INSTALL_DIR%
2323
set PATH=%PATH%;%INSTALL_DIR%\bin
2424

2525
cd %BUILD_DIR%
26-
%TAR% xf ..\..\mongoc.tar.gz -C . --strip-components=1
26+
robocopy "%SRCROOT%" "%BUILD_DIR%" /E /XD ".git" "%BUILD_DIR%" "_build" "cmake-build" /NP /NFL /NDL
2727

2828
rem Build libmongoc, with flags that the downstream R driver mongolite uses
2929
%CMAKE% -G "MinGW Makefiles" -DCMAKE_MAKE_PROGRAM=%CMAKE_MAKE_PROGRAM% -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DCMAKE_CFLAGS="-pedantic" -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake -DENABLE_STATIC=ON .

.evergreen/scripts/link-sample-program-mingw.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ mkdir %INSTALL_DIR%
2323
set PATH=%PATH%;%INSTALL_DIR%\bin
2424

2525
cd %BUILD_DIR%
26-
%TAR% xf ..\..\mongoc.tar.gz -C . --strip-components=1
26+
robocopy "%SRCROOT%" "%BUILD_DIR%" /E /XD ".git" "%BUILD_DIR%" "_build" "cmake-build" /NP /NFL /NDL
2727

2828
rem Build libmongoc, with flags that the downstream R driver mongolite uses
2929
%CMAKE% -G "MinGW Makefiles" -DCMAKE_MAKE_PROGRAM=%CMAKE_MAKE_PROGRAM% -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DCMAKE_CFLAGS="-pedantic" -DCMAKE_PREFIX_PATH=%INSTALL_DIR%\lib\cmake %CMAKE_FLAGS% .

.evergreen/scripts/link-sample-program-msvc-bson.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ rem Set path to dumpbin.exe and other VS tools.
2323
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvars64.bat"
2424

2525
cd %BUILD_DIR%
26-
%TAR% xf ..\..\mongoc.tar.gz -C . --strip-components=1
26+
robocopy "%SRCROOT%" "%BUILD_DIR%" /E /XD ".git" "%BUILD_DIR%" "_build" "cmake-build" /NP /NFL /NDL
2727

2828
if "%LINK_STATIC%"=="1" (
2929
%CMAKE% -G "Visual Studio 15 2017 Win64" -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DENABLE_TESTS=OFF .

.evergreen/scripts/link-sample-program-msvc.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ mkdir %INSTALL_DIR%
2323
set PATH=%PATH%;%INSTALL_DIR%\bin
2424

2525
rem Set path to dumpbin.exe and other VS tools.
26-
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvars64.bat"
26+
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
2727

2828
cd %BUILD_DIR%
29-
%TAR% xf ..\..\mongoc.tar.gz -C . --strip-components=1
29+
robocopy "%SRCROOT%" "%BUILD_DIR%" /E /XD ".git" "%BUILD_DIR%" "_build" "cmake-build" /NP /NFL /NDL
3030

3131
if "%ENABLE_SNAPPY%"=="1" (
3232
rem Enable Snappy

.evergreen/scripts/link-sample-program.sh

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ DIR=$(dirname $0)
1717
CMAKE=$(find_cmake_latest)
1818
. $DIR/check-symlink.sh
1919

20-
if command -v gtar 2>/dev/null; then
21-
TAR=gtar
22-
else
23-
TAR=tar
24-
fi
25-
2620
# Get the kernel name, lowercased
2721
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
2822
echo "OS: $OS"
@@ -38,17 +32,20 @@ else
3832
fi
3933

4034
SRCROOT=`pwd`
35+
SCRATCH_DIR=$(pwd)/.scratch
36+
rm -rf "$SCRATCH_DIR"
37+
mkdir -p "$SCRATCH_DIR"
38+
cp -r -- "$SRCROOT"/* "$SCRATCH_DIR"
4139

42-
BUILD_DIR=$(pwd)/build-dir
40+
BUILD_DIR=$SCRATCH_DIR/build-dir
4341
rm -rf $BUILD_DIR
4442
mkdir $BUILD_DIR
4543

46-
INSTALL_DIR=$(pwd)/install-dir
44+
INSTALL_DIR=$SCRATCH_DIR/install-dir
4745
rm -rf $INSTALL_DIR
4846
mkdir -p $INSTALL_DIR
4947

5048
cd $BUILD_DIR
51-
$TAR xf ../../mongoc.tar.gz -C . --strip-components=1
5249

5350
if [ "$ENABLE_SNAPPY" ]; then
5451
SNAPPY_CMAKE_OPTION="-DENABLE_SNAPPY=ON"
@@ -75,9 +72,9 @@ fi
7572

7673
ZSTD="AUTO"
7774

78-
$CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DCMAKE_PREFIX_PATH=$INSTALL_DIR/lib/cmake $SSL_CMAKE_OPTION $SNAPPY_CMAKE_OPTION $STATIC_CMAKE_OPTION -DENABLE_ZSTD=$ZSTD .
79-
$CMAKE --build .
80-
$CMAKE --build . --target install
75+
$CMAKE -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DCMAKE_PREFIX_PATH=$INSTALL_DIR/lib/cmake $SSL_CMAKE_OPTION $SNAPPY_CMAKE_OPTION $STATIC_CMAKE_OPTION -DENABLE_ZSTD=$ZSTD "$SCRATCH_DIR"
76+
$CMAKE --build . --parallel
77+
$CMAKE --build . --parallel --target install
8178

8279
ls -l $INSTALL_DIR/lib
8380

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*.so
1010
*.so.*
1111
.githooks
12+
.scratch/
1213
cmake-build
1314
cmake_install.cmake
1415
CMakeCache.txt

0 commit comments

Comments
 (0)