From 03ed218bb308ecdf79c6165ff65cfa3b7afea5d1 Mon Sep 17 00:00:00 2001 From: DaMandal0rian Date: Tue, 28 Jan 2025 15:03:37 +0300 Subject: [PATCH] testing runs-on --- .github/workflows/rust.yml | 55 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 356053a460..a039ad9409 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -53,7 +53,7 @@ jobs: os: ${{ fromJson(github.repository_owner == 'autonomys' && '[ "runs-on=${{ github.run_id }}/cpu=8+16/ram=16+32/family=m7a+m7i-flex/image=ubuntu22-full-x64", - "runs-on=${{ github.run_id }}/cpu=8+16/ram=16+32/family=m6i+m7i-flex/image=windowscustomimage", + "runs-on=${{ github.run_id }}/cpu=8+16/ram=16+32/family=m6i+m7i-flex/image=windows22-base-x64", ["self-hosted", "macos-14-arm64"] ]' || '["ubuntu-22.04", "macos-14", "windows-2022"]') }} @@ -85,6 +85,23 @@ jobs: uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} + if: runner.os == 'Linux' || runner.os == 'macOS' + + # Download and Install Protoc (Protocol Buffers Compiler) manually + - name: Install Protoc manually + run: | + # Download protoc + Invoke-WebRequest -Uri https://github.com/protocolbuffers/protobuf/releases/download/v23.3/protoc-23.3-win64.zip -OutFile protoc.zip + + # Unzip the file + Expand-Archive -Path protoc.zip -DestinationPath C:\protoc + + # Add protoc to the system path + $env:Path = "C:\protoc\bin;" + $env:Path + + # Verify installation + protoc --version + if: runner.os == 'Windows' # Needed for hwloc - name: Install automake (macOS) @@ -181,7 +198,7 @@ jobs: os: ${{ fromJson(github.repository_owner == 'autonomys' && '[ "runs-on=${{ github.run_id }}/cpu=8+16/ram=16+32/family=m7a+m7i-flex/image=ubuntu22-full-x64", - "runs-on=${{ github.run_id }}/cpu=8+16/ram=16+32/family=m6i+m7i-flex/image=windowscustomimage", + "runs-on=${{ github.run_id }}/cpu=8+16/ram=16+32/family=m6i+m7i-flex/image=windows22-base-x64", ["self-hosted", "macos-14-arm64"] ]' || '["ubuntu-22.04", "macos-14", "windows-2022"]') }} @@ -215,6 +232,24 @@ jobs: uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }} + if: runner.os == 'Linux' || runner.os == 'macOS' + + # Download and Install Protoc (Protocol Buffers Compiler) manually + # This is a temporary workaround until the windows custom image is fixed or full windows image is available from upstream + - name: Install Protoc manually + run: | + # Download protoc + Invoke-WebRequest -Uri https://github.com/protocolbuffers/protobuf/releases/download/v29.3/protoc-29.3-win64.zip -OutFile protoc.zip + + # Unzip the file + Expand-Archive -Path protoc.zip -DestinationPath C:\protoc + + # Add protoc to the system path + $env:Path = "C:\protoc\bin;" + $env:Path + + # Verify installation + protoc --version + if: runner.os == 'Windows' # Needed for hwloc - name: Install automake (macOS) @@ -231,6 +266,22 @@ jobs: restore-keys: | ${{ runner.os }}-cargo- + # This is a temporary workaround until the windows custom image is fixed or full windows image is available from upstream + - name: Install Git for Windows (with Git Bash) + run: | + # Download and install Git for Windows (which includes Git Bash) + Invoke-WebRequest -Uri https://github.com/git-for-windows/git/releases/download/v2.40.0.windows.1/Git-2.40.0-64-bit.exe -OutFile git-installer.exe + Start-Process -Wait -FilePath git-installer.exe -ArgumentList '/VERYSILENT', '/NORESTART' + if: runner.os == 'Windows' + + # This is a temporary workaround until the windows custom image is fixed or full windows image is available from upstream + - name: Ensure bash is in PATH (Windows) + run: | + # For Windows, we use Git Bash's path, which is typically installed at C:\Program Files\Git\bin + echo "PATH=$env:PATH;C:\Program Files\Git\bin" | OutFile -FilePath $env:GITHUB_ENV -Encoding utf8 + shell: pwsh + if: runner.os == 'Windows' + - name: Install cargo-nextest uses: taiki-e/install-action@07a34f8347b1eeb5f5469cdfa451b0a5db2ae4e8 # 2.38.4 with: