diff --git a/.circleci/config.yml b/.circleci/config.yml index 81fa7244cd..579fd143a9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -38,8 +38,6 @@ parameters: common_job_environment: &common_job_environment CARGO_NET_GIT_FETCH_WITH_CLI: true RUST_BACKTRACE: full - NODE_VERSION: 14.17.5 - NPM_VERSION: 7.10.0 commands: linux_install_baseline: @@ -77,87 +75,17 @@ commands: tar -xf jaeger.tar.gz mv jaeger-1.33.0-windows-amd64 jaeger - # This job sets up our nodejs dependencies, - # and makes sure everything is ready to run integration tests - macos_prepare_node_env: + # This job makes sure everything is ready to run integration tests + macos_prepare_env: steps: - #TODO[igni]: check for node version before we try to install it - # Installing this with the curl nvm command was proving difficult, - # so I've opted to just install the .pkg. Should be the same net - # result, even if liked the opportunity for symmetry with Linux. - - run: - name: Installing Node.js with a .pkg. - command: | - curl "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}.pkg" > "$HOME/Downloads/node.pkg" && sudo installer -store -pkg "$HOME/Downloads/node.pkg" -target "/" - sudo npm install --global npm@${NPM_VERSION} - - run: - name: Assert Node.js version - command: test "$(node --version)" = "v${NODE_VERSION}" - - run: - name: Assert npm version - command: test "$(npm --version)" = "${NPM_VERSION}" - run: # The jaeger exporter won't work without this name: Increase udp packet size command: | sudo sysctl net.inet.udp.maxdgram=65536 sudo sysctl net.inet.udp.maxdgram - linux_prepare_node_env: - steps: - #TODO[igni]: check for node version before we try to install it - - run: - name: Install nvm - command: | - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash - echo '. ~/.nvm/nvm.sh' >> $BASH_ENV - - run: - name: Install desired Node.js version - command: | - nvm install $NODE_VERSION - nvm alias default $NODE_VERSION - npm install --global npm@${NPM_VERSION} - - run: - name: Assert Node.js version - command: test "$(node --version)" = "v${NODE_VERSION}" - - run: - name: Assert npm version - command: test "$(npm --version)" = "${NPM_VERSION}" - windows_prepare_node_env: - #TODO[igni]: check for node version before we try to install it - steps: - - run: - name: Install desired Node.js version with nvm - command: | - nvm install ${Env:NODE_VERSION} - nvm on - - run: - # https://github.com/coreybutler/nvm-windows/issues/300 - # Have to move the command out of the way because it can't - # overwrite itself otherwise. This is madness, but apparently - # accepted. Other things I tried: using yarn to install npm, - # using http://npm.im/npm-windows-upgrade and even shouting. - name: Install specific version of npm in a crazy Windows way - command: | - $node_dir = (get-item (get-command npm).source).directory.fullname - foreach ($cmd in @("npm", "npx")) { - foreach ($ext in @(".ps1", ".cmd", "")) { - if (Test-Path "$node_dir/$cmd$ext") { - rename-item -path (join-path -path $node_dir -childpath "$cmd$ext") "${cmd}-orig${ext}" - } - } - } - npm-orig install --global "npm@${Env:NPM_VERSION}" - - run: - name: Assert Node.js version - command: | - if ((node --version) -Ne "v${Env:NODE_VERSION}") { exit 1 } - - run: - name: Assert npm version - command: | - if ((npm --version) -Ne "${Env:NPM_VERSION}") { exit 1 } - - windows_prepare_rust_env: + windows_prepare_env: steps: - run: name: Install rustup @@ -179,7 +107,7 @@ commands: [net] git-fetch-with-cli = true "@ - prepare_rust_env: + prepare_env: steps: - rust/install: version: stable @@ -238,9 +166,11 @@ commands: build_common_permutations: steps: - - rust/build: - with_cache: false - crate: --locked -p apollo-router + - run: + name: cargo check workspace + command: | + set -e -o pipefail + cargo check --locked build_all_permutations: steps: - build_common_permutations @@ -346,8 +276,7 @@ jobs: equal: [*rust_linux_executor, << parameters.platform >>] steps: - linux_install_baseline - - linux_prepare_node_env - - prepare_rust_env + - prepare_env - xtask_lint: os: linux check_compliance: @@ -364,8 +293,7 @@ jobs: equal: [*rust_linux_executor, << parameters.platform >>] steps: - linux_install_baseline - - linux_prepare_node_env - - prepare_rust_env + - prepare_env - xtask_check_compliance: os: linux build: @@ -382,8 +310,7 @@ jobs: equal: [*rust_linux_executor, << parameters.platform >>] steps: - linux_install_baseline - - linux_prepare_node_env - - prepare_rust_env + - prepare_env - build_workspace: os: linux - when: @@ -391,16 +318,14 @@ jobs: equal: [*rust_windows_executor, << parameters.platform >>] steps: - windows_install_baseline - - windows_prepare_node_env - - windows_prepare_rust_env + - windows_prepare_env - windows_build_workspace - when: condition: equal: [*rust_macos_executor, << parameters.platform >>] steps: - macos_install_baseline - - macos_prepare_node_env - - prepare_rust_env + - prepare_env - build_workspace: os: macos test: @@ -417,8 +342,7 @@ jobs: equal: [*rust_linux_executor, << parameters.platform >>] steps: - linux_install_baseline - - linux_prepare_node_env - - prepare_rust_env + - prepare_env - test_workspace: os: linux - when: @@ -426,16 +350,14 @@ jobs: equal: [*rust_windows_executor, << parameters.platform >>] steps: - windows_install_baseline - - windows_prepare_node_env - - windows_prepare_rust_env + - windows_prepare_env - windows_test_workspace - when: condition: equal: [*rust_macos_executor, << parameters.platform >>] steps: - macos_install_baseline - - macos_prepare_node_env - - prepare_rust_env + - prepare_env - test_workspace: os: macos @@ -465,23 +387,6 @@ jobs: - run: brew install cmake - rust/install: version: stable - # Installing this with the curl nvm command was proving difficult, - # so I've opted to just install the .pkg. Should be the same net - # result, even if liked the opportunity for symmetry with Linux. - - run: - name: Installing Node.js with a .pkg. - command: | - curl "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}.pkg" > "$HOME/Downloads/node.pkg" && sudo installer -store -pkg "$HOME/Downloads/node.pkg" -target "/" - - run: - name: Install specific version of npm - command: | - sudo npm install --global npm@${NPM_VERSION} - - run: - name: Assert Node.js version - command: test "$(node --version)" = "v${NODE_VERSION}" - - run: - name: Assert npm version - command: test "$(npm --version)" = "${NPM_VERSION}" - run: command: > cargo xtask dist @@ -510,22 +415,6 @@ jobs: sudo apt-get install -y libssl-dev - rust/install: version: stable - - run: - name: Install nvm - command: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash - - run: echo '. ~/.nvm/nvm.sh' >> $BASH_ENV - - run: - name: Install desired Node.js version - command: | - nvm install $NODE_VERSION - nvm alias default $NODE_VERSION - npm install --global npm@${NPM_VERSION} - - run: - name: Assert Node.js version - command: test "$(node --version)" = "v${NODE_VERSION}" - - run: - name: Assert npm version - command: test "$(npm --version)" = "${NPM_VERSION}" - run: command: > cargo xtask dist @@ -559,36 +448,6 @@ jobs: [net] git-fetch-with-cli = true "@ - - run: - name: Install desired Node.js version with nvm - command: | - nvm install ${Env:NODE_VERSION} - nvm on - - run: - # https://github.com/coreybutler/nvm-windows/issues/300 - # Have to move the command out of the way because it can't - # overwrite itself otherwise. This is madness, but apparently - # accepted. Other things I tried: using yarn to install npm, - # using http://npm.im/npm-windows-upgrade and even shouting. - name: Install specific version of npm in a crazy Windows way - command: | - $node_dir = (get-item (get-command npm).source).directory.fullname - foreach ($cmd in @("npm", "npx")) { - foreach ($ext in @(".ps1", ".cmd", "")) { - if (Test-Path "$node_dir/$cmd$ext") { - rename-item -path (join-path -path $node_dir -childpath "$cmd$ext") "${cmd}-orig${ext}" - } - } - } - npm-orig install --global "npm@${Env:NPM_VERSION}" - - run: - name: Assert Node.js version - command: | - if ((node --version) -Ne "v${Env:NODE_VERSION}") { exit 1 } - - run: - name: Assert npm version - command: | - if ((npm --version) -Ne "${Env:NPM_VERSION}") { exit 1 } - run: command: > cargo xtask dist