Skip to content

Commit ef29043

Browse files
committed
Rely on toolchain.toml for Rust version and use windows-mscv instead of windows-gnu platform target
1 parent aa945b6 commit ef29043

7 files changed

Lines changed: 9 additions & 32 deletions

File tree

.github/workflows/build-test.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ jobs:
139139
# but also before building the Haskell sources because the Haskell
140140
# build kicks of a Rust build.
141141
- name: Install Rust tools
142-
working-directory: plt
143142
run: |
144143
rustup component add clippy llvm-tools
145144
rustup target add x86_64-pc-windows-gnu

.github/workflows/release.yaml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ on:
2222
env:
2323
UBUNTU_VERSION: '22.04'
2424
STATIC_LIBRARIES_IMAGE_TAG: 'rust-1.94_ghc-9.10.2'
25-
RUST_VERSION: '1.94'
2625
STACK_VERSION: '3.7.1'
2726
FLATBUFFERS_VERSION: '23.5.26'
2827
GHC_VERSION: '9.10.2'
@@ -119,7 +118,6 @@ jobs:
119118
ghc_version=${{ env.GHC_VERSION }}
120119
protoc_version=${{ env.PROTOC_VERSION }}
121120
flatbuffers_version=${{ env.FLATBUFFERS_VERSION }}
122-
rust_toolchain_version=${{ env.RUST_VERSION }}
123121
labels: |
124122
ubuntu_version=${{ env.UBUNTU_VERSION }}
125123
static_libraries_image_tag=${{ env.STATIC_LIBRARIES_IMAGE_TAG }}
@@ -306,16 +304,6 @@ jobs:
306304
smctl healthcheck --all
307305
shell: cmd
308306

309-
- name: Install Rust
310-
uses: actions-rust-lang/setup-rust-toolchain@v1
311-
with:
312-
toolchain: ${{ env.RUST_VERSION }}-x86_64-pc-windows-msvc
313-
314-
- name: Install Rust
315-
uses: actions-rust-lang/setup-rust-toolchain@v1
316-
with:
317-
toolchain: ${{ env.RUST_VERSION }}-x86_64-pc-windows-gnu
318-
319307
- name: Setup node folder
320308
run: |
321309
mkdir -p "C:/Program Files/node/include"
@@ -362,7 +350,7 @@ jobs:
362350
SM_CLIENT_CERT_PASSWORD: ${{ secrets.WINDOWS_SM_CLIENT_CERT_PASSWORD }}
363351
SM_ARGS: "--verbose --exit-non-zero-on-fail --failfast"
364352
run: |
365-
./scripts/distribution/windows/build-all.ps1 -nodeVersion ${{ needs.validate-preconditions.outputs.version }} -rustVersion ${{ env.RUST_VERSION }}
353+
./scripts/distribution/windows/build-all.ps1 -nodeVersion ${{ needs.validate-preconditions.outputs.version }}
366354
367355
- name: Sign installer with smctl
368356
working-directory: ${{steps.build.outputs.bin_dir}}
@@ -435,10 +423,6 @@ jobs:
435423
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
436424
security list-keychain -d user -s $KEYCHAIN_PATH
437425
438-
- uses: actions-rust-lang/setup-rust-toolchain@v1
439-
with:
440-
toolchain: ${{ env.RUST_VERSION }}
441-
442426
- uses: haskell-actions/setup@v2
443427
with:
444428
ghc-version: ${{ env.GHC_VERSION }}

concordium-base

scripts/distribution/windows/build-all.ps1

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
param ([string] $rustVersion = "1.73", [string] $nodeVersion)
1+
param ([string] $nodeVersion)
22

33
Write-Output "stack version: $(stack --version)"
44
Write-Output "cargo version: $(cargo --version)"
55
Write-Output "flatc version: $(flatc --version)"
66
Write-Output "protoc version: $(protoc --version)"
77

8-
# Set the default rust toolchain so that consensus rust dependencies use it.
9-
rustup default $rustVersion-x86_64-pc-windows-gnu
10-
118
Write-Output "Building consensus..."
129
stack build
1310
if ($LASTEXITCODE -ne 0) { throw "Failed building consensus" }
@@ -17,7 +14,7 @@ stack exec -- cargo build --manifest-path concordium-node\Cargo.toml --release -
1714
if ($LASTEXITCODE -ne 0) { throw "Failed building node" }
1815

1916
Write-Output "Building the collector..."
20-
cargo +$rustVersion-x86_64-pc-windows-msvc build --manifest-path collector\Cargo.toml --release --locked
17+
cargo build --manifest-path collector\Cargo.toml --release --locked
2118
if ($LASTEXITCODE -ne 0) { throw "Failed building the collector" }
2219

2320
Write-Output "Building node runner service..."
@@ -26,7 +23,7 @@ Write-Output "Building node runner service..."
2623
# This ensures that the MSVC runtime is linked statically, and the output is produced
2724
# in the right target folder.
2825
Push-Location service\windows
29-
cargo +$rustVersion-x86_64-pc-windows-msvc build --release --locked
26+
cargo build --release --locked
3027
Pop-Location
3128
if ($LASTEXITCODE -ne 0) { throw "Failed building node runner service" }
3229

@@ -84,4 +81,4 @@ finally {
8481
}
8582

8683
# Build the installer
87-
service\windows\installer\build.ps1 -toolchain $rustVersion-x86_64-pc-windows-msvc -nodeVersion $nodeVersion
84+
service\windows\installer\build.ps1 -nodeVersion $nodeVersion

scripts/static-binaries/build-on-ubuntu.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ set -euxo pipefail
1313

1414
extra_features=${EXTRA_FEATURES:-""}
1515

16-
REQUIRED_PARAMETERS=("PROTOC_VERSION" "FLATBUFFERS_VERSION" "RUST_TOOLCHAIN_VERSION")
16+
REQUIRED_PARAMETERS=("PROTOC_VERSION" "FLATBUFFERS_VERSION")
1717

1818
# Loop through the required variables and check if they are set
1919
for VAR in "${REQUIRED_PARAMETERS[@]}"; do
@@ -50,7 +50,6 @@ rm protoc.zip
5050
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
5151
source "$HOME/.cargo/env"
5252
rustup set profile minimal
53-
rustup default "$RUST_TOOLCHAIN_VERSION"
5453

5554
ASSETS_URL="https://github.com/google/flatbuffers/releases/expanded_assets/v${FLATBUFFERS_VERSION}"
5655
GCC_VERSION=$(curl -s "$ASSETS_URL" | grep -oP 'Linux\.flatc\.binary\.g\+\+\-\K[0-9]+' | head -n 1)

scripts/static-binaries/static-binaries.Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,12 @@ ARG build_version
2929
ARG extra_features
3030
ARG protoc_version
3131
ARG flatbuffers_version
32-
ARG rust_toolchain_version
3332

3433
WORKDIR /build
3534
RUN BRANCH="${branch}" \
3635
EXTRA_FEATURES="${extra_features}" \
3736
PROTOC_VERSION="${protoc_version}" \
3837
FLATBUFFERS_VERSION="${flatbuffers_version}" \
39-
RUST_TOOLCHAIN_VERSION="${rust_toolchain_version}" \
4038
/build-on-ubuntu.sh
4139

4240
# The binaries are available in the

service/windows/installer/build.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
param ([string] $toolchain="", [string] $nodeVersion)
1+
param ([string] $nodeVersion)
22

33
Write-Output "Building Windows node installer..."
44

@@ -10,7 +10,7 @@ try {
1010
# Build the custom actions DLL. This provides custom functionality used by the installer.
1111
Write-Output "Building custom-actions.dll..."
1212
Push-Location custom-actions
13-
cargo +$toolchain build --release --locked
13+
cargo build --release --locked
1414
Pop-Location
1515
if ($LASTEXITCODE -ne 0) { throw "Failed building custom-actions.dll" }
1616

0 commit comments

Comments
 (0)