forked from microsoft/wassette
-
Notifications
You must be signed in to change notification settings - Fork 0
111 lines (96 loc) · 3.78 KB
/
copilot-setup-steps.yml
File metadata and controls
111 lines (96 loc) · 3.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: "Copilot Setup Steps"
# Automatically run the setup steps when they are changed to allow for easy validation, and
# allow manual testing through the repository's "Actions" tab
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml
jobs:
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
copilot-setup-steps:
runs-on: ubuntu-latest
# Set the permissions to the lowest permissions possible needed for your steps.
# Copilot will be given its own token for its operations.
permissions:
# If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete.
contents: read
steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
# Install protobuf compiler (required for building)
- name: Install protobuf
run: ./scripts/install-protobuf.sh
shell: bash
# Setup Rust toolchain
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1.15.2
with:
components: rustfmt, clippy
# Install nightly toolchain for formatting
- name: Install nightly Rust for formatting
run: rustup toolchain install nightly --component rustfmt
# Add wasm32-wasip2 target for WebAssembly components
- name: Add wasm32-wasip2 target
run: rustup target add wasm32-wasip2
# Install just command runner
- name: Setup just
uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3.0.0
# Install wasm-tools for WebAssembly manipulation
- name: Setup wasm-tools
uses: bytecodealliance/actions/wasm-tools/setup@3b93676295fd6f7eaa7af2c2785539e052fa8349 # v1.1.1
# Install uv for Python package management
- name: Setup uv
uses: astral-sh/setup-uv@3259c6206f993105e3a61b142c2d97bf4b9ef83d # v7.1.0
# Install TinyGo for Go WebAssembly examples
- name: Setup TinyGo
uses: acifani/setup-tinygo@db56321a62b9a67922bb9ac8f9d085e218807bb3 # v0.2.1
with:
tinygo-version: '0.36.0'
# Cache Rust dependencies
- name: Cache Rust dependencies
uses: ./.github/actions/rust-cache
# Install gh-aw extension for agentic workflows
- name: Install gh-aw extension
run: gh extension install githubnext/gh-aw
env:
GH_TOKEN: ${{ github.token }}
# Verify installations
- name: Verify tool installations
run: |
echo "=== Development Environment Setup Complete ==="
echo ""
echo "Rust toolchain:"
rustc --version
cargo --version
echo ""
echo "Nightly formatter:"
cargo +nightly fmt --version
echo ""
echo "Build tools:"
just --version
protoc --version
wasm-tools --version
echo ""
echo "Language support:"
uv --version
tinygo version
echo ""
echo "WASM target installed:"
rustup target list --installed | grep wasm32-wasip2
echo ""
echo "GitHub extensions:"
gh extension list
echo ""
echo "=== Ready for development! ==="
echo "You can now run:"
echo " - just build # Build the project"
echo " - just test # Run tests"
echo " - just run # Start MCP server"
echo " - cargo clippy # Run linter"
env:
GH_TOKEN: ${{ github.token }}