|
1 | 1 | name: Copilot Setup Steps |
2 | 2 |
|
3 | 3 | # This workflow sets up the development environment for GitHub Copilot coding agent |
4 | | -# It leverages the existing devcontainer configuration to ensure consistency |
5 | | -# with the development environment and avoid duplication of tooling setup |
| 4 | +# It uses a pre-built container image with all the necessary tools already installed |
6 | 5 | # |
7 | 6 | # The workflow: |
8 | | -# - Uses the same base container image as the devcontainer (mcr.microsoft.com/devcontainers/rust) |
9 | | -# - Runs the devcontainer post-create script for environment setup |
10 | | -# - Installs the same development tools specified in the devcontainer |
| 7 | +# - Uses the heaths/azure-sdk-for-rust:latest container image with all dependencies |
| 8 | +# - Maps the repository into the standard devcontainer workspace location |
11 | 9 | # - Caches Cargo dependencies for improved performance |
12 | 10 | # - Runs comprehensive workspace verification (check, clippy, fmt) |
13 | 11 | # - Tests basic functionality to ensure the environment is ready |
14 | 12 | # |
15 | | -# This approach maintains consistency with the existing devcontainer setup |
16 | | -# and avoids maintaining duplicate tool installation logic |
| 13 | +# This approach leverages a pre-built image that contains all the tools from |
| 14 | +# the devcontainer configuration, avoiding the need to install tools at runtime |
17 | 15 | # |
18 | 16 | # Triggers: |
19 | 17 | # - Manual execution via workflow_dispatch |
@@ -52,25 +50,15 @@ jobs: |
52 | 50 | contents: read |
53 | 51 | environment: Copilot |
54 | 52 | container: |
55 | | - image: mcr.microsoft.com/devcontainers/rust:1-1-bullseye |
| 53 | + image: heaths/azure-sdk-for-rust:latest |
| 54 | + volumes: |
| 55 | + - ${{ github.workspace }}:/workspaces/azure-sdk-for-rust |
| 56 | + options: --workdir /workspaces/azure-sdk-for-rust |
56 | 57 |
|
57 | 58 | steps: |
58 | 59 | - name: Checkout repository |
59 | 60 | uses: actions/checkout@v4 |
60 | 61 |
|
61 | | - - name: Setup development environment using devcontainer configuration |
62 | | - run: | |
63 | | - # Run the devcontainer post-create script to set up additional toolchains |
64 | | - chmod +x .devcontainer/oncreate |
65 | | - ./.devcontainer/oncreate |
66 | | - |
67 | | - - name: Install additional tools for Azure SDK development |
68 | | - run: | |
69 | | - # Install tools commonly needed for Rust development and Azure SDK |
70 | | - # Note: cargo-watch and http-server are already installed in the container |
71 | | - cargo install cargo-audit || echo "cargo-audit already installed or failed to install" |
72 | | - cargo install cargo-outdated || echo "cargo-outdated already installed or failed to install" |
73 | | - |
74 | 62 | - name: Cache Cargo dependencies |
75 | 63 | uses: actions/cache@v4 |
76 | 64 | with: |
@@ -117,8 +105,6 @@ jobs: |
117 | 105 | echo "=== Installed Components ===" |
118 | 106 | rustup component list --installed |
119 | 107 | echo "=== Available Tools ===" |
120 | | - which cargo-audit && cargo-audit --version || echo "cargo-audit not available" |
121 | | - which cargo-outdated && cargo-outdated --version || echo "cargo-outdated not available" |
122 | 108 | which cargo-watch && cargo-watch --version || echo "cargo-watch not available" |
123 | 109 | which http-server && http-server --version || echo "http-server not available" |
124 | 110 | echo "=== System Dependencies ===" |
|
0 commit comments