Skip to content

Commit be0eeed

Browse files
committed
GODRIVER-3182 Replace makefile with taskfile
1 parent 92c3d6e commit be0eeed

13 files changed

+234
-258
lines changed

.evergreen/config.yml

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ functions:
9797
go version
9898
go env
9999
100+
# Install taskfile.
101+
go install github.com/go-task/task/v3/cmd/task@latest
102+
100103
# Install libmongocrypt.
101104
bash etc/install-libmongocrypt.sh
102105
if [ "Windows_NT" = "$OS" ]; then
@@ -276,17 +279,17 @@ functions:
276279
script: |
277280
${PREPARE_SHELL}
278281
export OIDC="oidc"
279-
bash ${PROJECT_DIRECTORY}/etc/run-oidc-test.sh 'make -s evg-test-oidc-auth'
282+
bash ${PROJECT_DIRECTORY}/etc/run-oidc-test.sh 'task --silent evg-test-oidc-auth'
280283
281-
run-make:
284+
run-task:
282285
- command: shell.exec
283286
type: test
284287
params:
285288
shell: "bash"
286289
working_dir: src/go.mongodb.org/mongo-driver
287290
script: |
288291
${PREPARE_SHELL}
289-
${BUILD_ENV|} BUILD_TAGS=${BUILD_TAGS|-tags=cse,gssapi} make ${targets}
292+
${BUILD_ENV|} BUILD_TAGS=${BUILD_TAGS|-tags=cse,gssapi} task ${targets}
290293
291294
run-tests:
292295
- command: shell.exec
@@ -411,7 +414,7 @@ functions:
411414
TOPOLOGY="server" \
412415
MONGODB_URI="${MONGODB_URI}" \
413416
OCSP_TLS_SHOULD_SUCCEED="${OCSP_TLS_SHOULD_SUCCEED}" \
414-
make evg-test-ocsp
417+
task evg-test-ocsp
415418
416419
run-versioned-api-test:
417420
- command: shell.exec
@@ -441,7 +444,7 @@ functions:
441444
BUILD_TAGS="-tags=cse" \
442445
REQUIRE_API_VERSION="${REQUIRE_API_VERSION}" \
443446
CRYPT_SHARED_LIB_PATH="$CRYPT_SHARED_LIB_PATH" \
444-
make evg-test-versioned-api \
447+
task evg-test-versioned-api \
445448
PKG_CONFIG_PATH=$PKG_CONFIG_PATH \
446449
LD_LIBRARY_PATH=$LD_LIBRARY_PATH
447450
@@ -488,7 +491,7 @@ functions:
488491
MULTI_MONGOS_LB_URI="${MULTI_MONGOS_LB_URI}" \
489492
TOPOLOGY="${TOPOLOGY}" \
490493
MONGO_GO_DRIVER_COMPRESSOR=${MONGO_GO_DRIVER_COMPRESSOR} \
491-
make evg-test-load-balancers
494+
task evg-test-load-balancers
492495
493496
run-serverless-tests:
494497
- command: shell.exec
@@ -512,7 +515,7 @@ functions:
512515
SSL="nossl" \
513516
TOPOLOGY="server" \
514517
MONGODB_URI="mongodb://mhuser:pencil@localhost" \
515-
make evg-test-atlas-data-lake
518+
task evg-test-atlas-data-lake
516519
517520
run-docker-test:
518521
- command: shell.exec
@@ -608,7 +611,7 @@ functions:
608611
script: |
609612
${PREPARE_SHELL}
610613
TEST_INDEX_URI="${TEST_INDEX_URI}" \
611-
make evg-test-search-index
614+
task evg-test-search-index
612615
613616
add-aws-auth-variables-to-file:
614617
- command: ec2.assume_role
@@ -688,7 +691,7 @@ functions:
688691
echo "This platform does not support the ECS auth test, skipping..."
689692
exit 0
690693
fi
691-
make build-aws-ecs-test
694+
task build-aws-ecs-test
692695
- command: shell.exec
693696
type: test
694697
params:
@@ -773,7 +776,7 @@ functions:
773776
TOPOLOGY="${TOPOLOGY}" \
774777
MONGO_GO_DRIVER_COMPRESSOR=${MONGO_GO_DRIVER_COMPRESSOR} \
775778
BUILD_TAGS="-tags=cse" \
776-
make evg-test-kms \
779+
task evg-test-kms \
777780
PKG_CONFIG_PATH=$PKG_CONFIG_PATH \
778781
LD_LIBRARY_PATH=$LD_LIBRARY_PATH
779782
@@ -794,7 +797,7 @@ functions:
794797
TOPOLOGY="${TOPOLOGY}" \
795798
MONGO_GO_DRIVER_COMPRESSOR=${MONGO_GO_DRIVER_COMPRESSOR} \
796799
BUILD_TAGS="-tags=cse" \
797-
make evg-test-kmip \
800+
task evg-test-kmip \
798801
PKG_CONFIG_PATH=$PKG_CONFIG_PATH \
799802
LD_LIBRARY_PATH=$LD_LIBRARY_PATH
800803
@@ -820,7 +823,7 @@ tasks:
820823
- name: static-analysis
821824
tags: ["static-analysis"]
822825
commands:
823-
- func: run-make
826+
- func: run-task
824827
vars:
825828
targets: "check-fmt check-license check-modules lint"
826829

@@ -845,7 +848,7 @@ tasks:
845848
TOPOLOGY: "server"
846849
AUTH: "noauth"
847850
SSL: "nossl"
848-
- func: run-make
851+
- func: run-task
849852
vars:
850853
targets: driver-benchmark
851854
- func: send-perf-data
@@ -1591,7 +1594,7 @@ tasks:
15911594
- name: go1.18-build
15921595
tags: ["compile-check"]
15931596
commands:
1594-
- func: run-make
1597+
- func: run-task
15951598
vars:
15961599
targets: "build-compile-check"
15971600
BUILD_ENV: "PATH=/opt/golang/go1.18/bin:$PATH GOROOT=/opt/golang/go1.18"
@@ -1600,7 +1603,7 @@ tasks:
16001603
- name: build
16011604
tags: ["compile-check"]
16021605
commands:
1603-
- func: run-make
1606+
- func: run-task
16041607
vars:
16051608
targets: "build"
16061609

@@ -1724,7 +1727,7 @@ tasks:
17241727
echo "Building build-kms-test ... begin"
17251728
BUILD_TAGS="-tags=cse" \
17261729
PKG_CONFIG_PATH=$PKG_CONFIG_PATH \
1727-
make build-kms-test
1730+
task build-kms-test
17281731
echo "Building build-kms-test ... end"
17291732
source $DRIVERS_TOOLS/.evergreen/csfle/gcpkms/secrets-export.sh
17301733
echo "Copying files ... begin"
@@ -1760,7 +1763,7 @@ tasks:
17601763
echo "Building build-kms-test ... begin"
17611764
BUILD_TAGS="-tags=cse" \
17621765
PKG_CONFIG_PATH=$PKG_CONFIG_PATH \
1763-
make build-kms-test
1766+
task build-kms-test
17641767
echo "Building build-kms-test ... end"
17651768
LD_LIBRARY_PATH=./install/libmongocrypt/lib64 \
17661769
MONGODB_URI='mongodb://localhost:27017/' \
@@ -1805,7 +1808,7 @@ tasks:
18051808
echo "Building build-kms-test ... begin"
18061809
BUILD_TAGS="-tags=cse" \
18071810
PKG_CONFIG_PATH=$PKG_CONFIG_PATH \
1808-
make build-kms-test
1811+
task build-kms-test
18091812
echo "Building build-kms-test ... end"
18101813
18111814
echo "Copying files ... begin"
@@ -1841,7 +1844,7 @@ tasks:
18411844
echo "Building build-kms-test ... begin"
18421845
BUILD_TAGS="-tags=cse" \
18431846
PKG_CONFIG_PATH=$PKG_CONFIG_PATH \
1844-
make build-kms-test
1847+
task build-kms-test
18451848
echo "Building build-kms-test ... end"
18461849
18471850
LD_LIBRARY_PATH=./install/libmongocrypt/lib64 \

.evergreen/run-tests.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ else
7676
echo "crypt_shared library will be loaded from path: $CRYPT_SHARED_LIB_PATH"
7777
fi
7878

79-
if [ -z ${MAKEFILE_TARGET+x} ]; then
79+
if [ -z ${TASKFILE_TARGET+x} ]; then
8080
if [ "$(uname -s)" = "Darwin" ]; then
8181
# Run a subset of the tests on Darwin
82-
MAKEFILE_TARGET="evg-test-load-balancers"
82+
TASKFILE_TARGET="evg-test-load-balancers"
8383
else
84-
MAKEFILE_TARGET="evg-test"
84+
TASKFILE_TARGET="evg-test"
8585
fi
8686
fi
8787

@@ -99,4 +99,4 @@ CRYPT_SHARED_LIB_PATH=$CRYPT_SHARED_LIB_PATH \
9999
PKG_CONFIG_PATH=$PKG_CONFIG_PATH \
100100
LD_LIBRARY_PATH=$LD_LIBRARY_PATH \
101101
MACOS_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH \
102-
make $MAKEFILE_TARGET
102+
task $TASKFILE_TARGET

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
5050
apt-get -qqy install --option Acquire::Retries=100 --option Acquire::http::Timeout="60" --no-install-recommends golang-go && \
5151
rm -rf /var/lib/apt/lists/*
5252

53+
# Install taskfile
54+
RUN go install github.com/go-task/task/v3/cmd/task@latest
55+
5356
COPY ./etc/docker_entry.sh /root/docker_entry.sh
5457

5558
COPY --from=libmongocrypt /root/install /root/install

0 commit comments

Comments
 (0)