1
1
version : 2.1
2
2
3
- # Cache key bump: 1
3
+ # Cache key bump: 2
4
4
5
5
# These "CircleCI Orbs" are reusable bits of configuration that can be shared
6
6
# across projects. See https://circleci.com/orbs/ for more information.
@@ -48,18 +48,14 @@ executors:
48
48
# See https://circleci.com/docs/xcode-policy along with the support matrix
49
49
# at https://circleci.com/docs/using-macos#supported-xcode-versions.
50
50
# We use the major.minor notation to bring in compatible patches.
51
- xcode : " 14.2 .0"
51
+ xcode : " 15.4 .0"
52
52
resource_class : macos.m1.large.gen1
53
53
macos_test : &macos_test_executor
54
54
macos :
55
55
# See https://circleci.com/docs/xcode-policy along with the support matrix
56
56
# at https://circleci.com/docs/using-macos#supported-xcode-versions.
57
57
# We use the major.minor notation to bring in compatible patches.
58
- #
59
- # TODO: remove workaround added in https://github.com/apollographql/router/pull/5462
60
- # once we update to Xcode >= 15.1.0
61
- # See: https://github.com/apollographql/router/pull/5462
62
- xcode : " 14.2.0"
58
+ xcode : " 15.4.0"
63
59
resource_class : macos.m1.large.gen1
64
60
windows_build : &windows_build_executor
65
61
machine :
@@ -76,23 +72,30 @@ executors:
76
72
parameters :
77
73
toolchain_version :
78
74
type : string
79
- default : ' {{ checksum ".circleci/config.yml" }}-v2 -{{ checksum "~/.arch" }}-{{ checksum "rust-toolchain.toml" }}-{{ checksum "~/.daily_version" }}'
75
+ default : ' {{ checksum ".circleci/config.yml" }}-v3 -{{ checksum "~/.arch" }}-{{ checksum "rust-toolchain.toml" }}-{{ checksum "~/.daily_version" }}'
80
76
xtask_version :
81
77
type : string
82
- default : ' {{ checksum ".circleci/config.yml" }}-{{ checksum "~/.arch" }}-{{ checksum "rust-toolchain.toml" }}-{{ checksum "~/.xtask_version" }}'
78
+ default : ' {{ checksum ".circleci/config.yml" }}-v3- {{ checksum "~/.arch" }}-{{ checksum "rust-toolchain.toml" }}-{{ checksum "~/.xtask_version" }}'
83
79
merge_version :
84
80
type : string
85
- default : ' {{ checksum ".circleci/config.yml" }}-{{ checksum "~/.arch" }}-{{ checksum "rust-toolchain.toml" }}-{{ checksum "~/.xtask_version" }}-{{ checksum "~/.merge_version" }}'
81
+ default : ' {{ checksum ".circleci/config.yml" }}-v3- {{ checksum "~/.arch" }}-{{ checksum "rust-toolchain.toml" }}-{{ checksum "~/.xtask_version" }}-{{ checksum "~/.merge_version" }}'
86
82
protoc_version :
87
83
type : string
88
84
default : " 21.8"
85
+ # note the cmake version is only used for manual installs, not for installs from a package manager like apt or homebrew
86
+ cmake_version :
87
+ type : string
88
+ default : " 3.31.1"
89
89
nightly :
90
90
type : boolean
91
91
default : false
92
92
# quick_nightly will skip testing and only build the release artifacts.
93
93
quick_nightly :
94
94
type : boolean
95
95
default : false
96
+ test_updated_cargo_deps :
97
+ type : boolean
98
+ default : false
96
99
97
100
# These are common environment variables that we want to set on on all jobs.
98
101
# While these could conceivably be set on the CircleCI project settings'
@@ -246,9 +249,15 @@ commands:
246
249
- run :
247
250
name : Install CMake
248
251
command : |
249
- choco install cmake.install -y
250
- echo 'export PATH="/c/Program Files/CMake/bin:$PATH"' >> "$BASH_ENV"
251
- exit $LASTEXITCODE
252
+ mkdir -p "$HOME/.local"
253
+ if [[ ! -f "$HOME/.local/bin/cmake" ]]; then
254
+ curl -L https://github.com/Kitware/CMake/releases/download/v<< pipeline.parameters.cmake_version >>/cmake-<< pipeline.parameters.cmake_version >>-windows-x86_64.zip --output cmake.zip
255
+ # The zip file has a root directory, so we put it somewhere else first before placing the files in .local
256
+ unzip cmake.zip -d /tmp > /dev/null
257
+ cp /tmp/cmake-<< pipeline.parameters.cmake_version >>-windows-x86_64/* -R "$HOME/.local"
258
+ fi
259
+
260
+ cmake --version
252
261
- when :
253
262
condition :
254
263
or :
@@ -503,11 +512,7 @@ commands:
503
512
environment :
504
513
# Use the settings from the "ci" profile in nextest configuration.
505
514
NEXTEST_PROFILE : ci
506
- # Temporary disable lib backtrace since it crashing on MacOS
507
- # TODO: remove this workaround once we update to Xcode >= 15.1.0
508
- # See: https://github.com/apollographql/router/pull/5462
509
- RUST_LIB_BACKTRACE : 0
510
- command : xtask test --workspace --locked --features ci
515
+ command : xtask test --workspace --locked --features ci,hyper_header_limits
511
516
- run :
512
517
name : Delete large files from cache
513
518
command : |
@@ -599,6 +604,10 @@ jobs:
599
604
parameters :
600
605
platform :
601
606
type : executor
607
+ default : amd_linux_test
608
+ from_test_updated_cargo_deps_workflow :
609
+ type : boolean
610
+ default : false
602
611
executor : << parameters.platform >>
603
612
steps :
604
613
- checkout
@@ -611,6 +620,67 @@ jobs:
611
620
cargo fetch
612
621
- xtask_test :
613
622
variant : " updated"
623
+
624
+ - when :
625
+ condition :
626
+ equal : [ true, << parameters.from_test_updated_cargo_deps_workflow >> ]
627
+ steps :
628
+ - slack/notify :
629
+ event : fail
630
+ custom : |
631
+ {
632
+ "blocks": [
633
+ {
634
+ "type": "section",
635
+ "text": {
636
+ "type": "mrkdwn",
637
+ "text": ":x: The `test_updated_cargo_deps` workflow has **failed** for `${CIRCLE_JOB}` on `${CIRCLE_PROJECT_REPONAME}`'s `${CIRCLE_BRANCH}`!"
638
+ }
639
+ },
640
+ {
641
+ "type": "actions",
642
+ "elements": [
643
+ {
644
+ "type": "button",
645
+ "action_id": "success_tagged_deploy_view",
646
+ "text": {
647
+ "type": "plain_text",
648
+ "text": "View Job"
649
+ },
650
+ "url": "${CIRCLE_BUILD_URL}"
651
+ }
652
+ ]
653
+ }
654
+ ]
655
+ }
656
+ - slack/notify :
657
+ event : pass
658
+ custom : |
659
+ {
660
+ "blocks": [
661
+ {
662
+ "type": "section",
663
+ "text": {
664
+ "type": "mrkdwn",
665
+ "text": ":white_check_mark: The `test_updated_cargo_deps` workflow has passed for `${CIRCLE_JOB}` on `${CIRCLE_PROJECT_REPONAME}`'s `${CIRCLE_BRANCH}`."
666
+ }
667
+ },
668
+ {
669
+ "type": "actions",
670
+ "elements": [
671
+ {
672
+ "type": "button",
673
+ "action_id": "success_tagged_deploy_view",
674
+ "text": {
675
+ "type": "plain_text",
676
+ "text": "View Job"
677
+ },
678
+ "url": "${CIRCLE_BUILD_URL}"
679
+ }
680
+ ]
681
+ }
682
+ ]
683
+ }
614
684
pre_verify_release :
615
685
environment :
616
686
<< : *common_job_environment
@@ -655,10 +725,10 @@ jobs:
655
725
- run : cargo xtask release prepare nightly
656
726
- run :
657
727
command : >
658
- cargo xtask dist --target aarch64-apple-darwin
728
+ cargo xtask dist --target aarch64-apple-darwin --features hyper_header_limits
659
729
- run :
660
730
command : >
661
- cargo xtask dist --target x86_64-apple-darwin
731
+ cargo xtask dist --target x86_64-apple-darwin --features hyper_header_limits
662
732
- run :
663
733
command : >
664
734
mkdir -p artifacts
@@ -718,7 +788,7 @@ jobs:
718
788
- run : cargo xtask release prepare nightly
719
789
- run :
720
790
command : >
721
- cargo xtask dist
791
+ cargo xtask dist --features hyper_header_limits
722
792
- run :
723
793
command : >
724
794
mkdir -p artifacts
@@ -750,20 +820,20 @@ jobs:
750
820
command : |
751
821
# Source of the new image will be ser to the repo URL.
752
822
# This will have the effect of setting org.opencontainers.image.source and org.opencontainers.image.author to the originating pipeline
753
- # Therefore the docker image will have the same permissions as the originating project.
823
+ # Therefore the docker image will have the same permissions as the originating project.
754
824
# See: https://docs.github.com/en/packages/learn-github-packages/connecting-a-repository-to-a-package#connecting-a-repository-to-a-container-image-using-the-command-line
755
-
825
+
756
826
BASE_VERSION=$(cargo metadata --format-version=1 --no-deps | jq --raw-output '.packages[0].version')
757
827
ARTIFACT_URL="https://output.circle-artifacts.com/output/job/${CIRCLE_WORKFLOW_JOB_ID}/artifacts/0/artifacts/router-v${BASE_VERSION}-x86_64-unknown-linux-gnu.tar.gz"
758
828
VERSION="v$(echo "${BASE_VERSION}" | tr "+" "-")"
759
829
ROUTER_TAG=ghcr.io/apollographql/nightly/router
760
-
830
+
761
831
echo "REPO_URL: ${REPO_URL}"
762
832
echo "BASE_VERSION: ${BASE_VERSION}"
763
833
echo "ARTIFACT_URL: ${ARTIFACT_URL}"
764
834
echo "VERSION: ${VERSION}"
765
835
echo "ROUTER_TAG: ${ROUTER_TAG}"
766
-
836
+
767
837
# Create a multi-arch builder which works properly under qemu
768
838
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
769
839
docker context create buildx-build
@@ -948,12 +1018,19 @@ jobs:
948
1018
helm push ${CHART} oci://ghcr.io/apollographql/helm-charts
949
1019
950
1020
workflows :
1021
+ test_updated_cargo_deps :
1022
+ when : << pipeline.parameters.test_updated_cargo_deps >>
1023
+ jobs :
1024
+ - test_updated :
1025
+ platform : amd_linux_test
1026
+ from_test_updated_cargo_deps_workflow : true
951
1027
ci_checks :
952
1028
when :
953
1029
not :
954
1030
or :
955
1031
- << pipeline.parameters.nightly >>
956
1032
- << pipeline.parameters.quick_nightly >>
1033
+ - << pipeline.parameters.test_updated_cargo_deps >>
957
1034
jobs :
958
1035
- lint :
959
1036
matrix :
@@ -968,15 +1045,6 @@ workflows:
968
1045
parameters :
969
1046
platform : [ amd_linux_build ]
970
1047
971
- - test_updated :
972
- requires :
973
- - lint
974
- - check_helm
975
- - check_compliance
976
- matrix :
977
- parameters :
978
- platform :
979
- [ amd_linux_test ]
980
1048
- test :
981
1049
# this should be changed back to true on dev after release
982
1050
fuzz : false
@@ -1016,29 +1084,18 @@ workflows:
1016
1084
matrix :
1017
1085
parameters :
1018
1086
platform : [ amd_linux_build ]
1019
-
1020
- - test_updated :
1021
- requires :
1022
- - lint
1023
- - check_helm
1024
- - check_compliance
1025
- matrix :
1026
- parameters :
1027
- platform :
1028
- [ amd_linux_test ]
1029
1087
- test :
1030
1088
requires :
1031
1089
- lint
1032
- - check_helm
1033
- - check_compliance
1034
1090
matrix :
1035
1091
parameters :
1036
1092
platform :
1037
1093
[ macos_test, windows_test, amd_linux_test, arm_linux_test ]
1038
1094
- build_release :
1039
1095
requires :
1040
1096
- test
1041
- - test_updated
1097
+ - check_helm
1098
+ - check_compliance
1042
1099
nightly : true
1043
1100
context :
1044
1101
- router
@@ -1073,6 +1130,7 @@ workflows:
1073
1130
or :
1074
1131
- << pipeline.parameters.nightly >>
1075
1132
- << pipeline.parameters.quick_nightly >>
1133
+ - << pipeline.parameters.test_updated_cargo_deps >>
1076
1134
jobs :
1077
1135
- pre_verify_release :
1078
1136
matrix :
@@ -1110,16 +1168,6 @@ workflows:
1110
1168
ignore : /.*/
1111
1169
tags :
1112
1170
only : /v.*/
1113
- - test_updated :
1114
- matrix :
1115
- parameters :
1116
- platform :
1117
- [ amd_linux_test ]
1118
- filters :
1119
- branches :
1120
- ignore : /.*/
1121
- tags :
1122
- only : /v.*/
1123
1171
- test :
1124
1172
matrix :
1125
1173
parameters :
@@ -1148,7 +1196,6 @@ workflows:
1148
1196
- check_compliance
1149
1197
- pre_verify_release
1150
1198
- test
1151
- - test_updated
1152
1199
filters :
1153
1200
branches :
1154
1201
ignore : /.*/
@@ -1161,6 +1208,7 @@ workflows:
1161
1208
or :
1162
1209
- << pipeline.parameters.nightly >>
1163
1210
- << pipeline.parameters.quick_nightly >>
1211
+ - << pipeline.parameters.test_updated_cargo_deps >>
1164
1212
jobs :
1165
1213
- secops/gitleaks :
1166
1214
context :
0 commit comments