diff --git a/.github/workflows/build-macos.yaml b/.github/workflows/build-macos.yaml index 0861d5cef66e2..b3e895a88ad17 100644 --- a/.github/workflows/build-macos.yaml +++ b/.github/workflows/build-macos.yaml @@ -36,15 +36,37 @@ jobs: - name: Checkout Teleport uses: actions/checkout@v3 - - name: Get Go version - id: go-version - shell: bash - run: echo "go-version=$(make --no-print-directory print-go-version | tr -d '\n')" >> $GITHUB_OUTPUT + - name: Determine Toolchain Versions and cache paths + run: | + echo NODE_VERSION=$(make -C build.assets print-node-version) >> $GITHUB_ENV + echo GOLANG_VERSION=$(make -C build.assets print-go-version | sed 's/^go//') >> $GITHUB_ENV + echo RUST_VERSION=$(make -C build.assets print-rust-version) >> $GITHUB_ENV + echo PKG_CONFIG_PATH="$(build.assets/build-fido2-macos.sh pkg_config_path)" >> $GITHUB_ENV - - name: Setup Go + - name: Print versions + run: | + echo "make: $(make --version)" + echo "node: ${NODE_VERSION}" + echo "go: ${GOLANG_VERSION}" + echo "rust: ${RUST_VERSION}" + + - name: Install Node Toolchain + uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_VERSION }} + + - name: Setup yarn + run: | + corepack enable yarn + + - name: Install Go Toolchain uses: actions/setup-go@v3 with: - go-version: ${{ steps.go-version.outputs.go-version }} + go-version: ${{ env.GOLANG_VERSION }} + + - name: Configure Rust Toolchain + run: | + rustup override set ${{ env.RUST_VERSION }} - name: Build run: make binaries diff --git a/Makefile b/Makefile index 6844282bab906..951ee9324a599 100644 --- a/Makefile +++ b/Makefile @@ -101,6 +101,11 @@ endif CHECK_CARGO := $(shell cargo --version 2>/dev/null) CHECK_RUST := $(shell rustc --version 2>/dev/null) +# Have cargo use sparse crates.io protocol: +# https://blog.rust-lang.org/2023/03/09/Rust-1.68.0.html +# TODO: Delete when it becomes default in Rust 1.70.0 +export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse + with_rdpclient := no RDPCLIENT_MESSAGE := without-Windows-RDP-client