メインコンテンツへスキップ

Documentation Index

Fetch the complete documentation index at: https://docs.devin.ai/llms.txt

Use this file to discover all available pages before exploring further.

Devin は、ビルドおよびセッションのプラットフォームとして Windows をサポートしています。Windows 環境では Linux と同じ bash シェル (Git Bash) を利用するため、ほとんどのブループリントのコマンドは両方のプラットフォームでそのまま動作します。
Windows サポートは現在、限定提供です。Devin で Windows を試してみたい場合は、詳細の確認とアクセス権の取得について、お問い合わせください。

仕組み

Windows のサポートは、Linux と同じ宣言的構成システムに基づいています。主な違いはブループリントの runs-on フィールドで、ここで Devin がどのプラットフォームでビルドと実行を行うかを指定します。 どちらのプラットフォームでも bash を利用するため、Linux と Windows で同じシェルコマンドを記述できます。主な違いは、ファイルシステムの構成と利用可能なパッケージマネージャーです。
項目Linux (デフォルト)Windows
ホームディレクトリ/home/ubuntu/c/Users/Administrator
リポジトリディレクトリ~/repos/<repo-name>/c/Users/Administrator/repos/<repo-name>
パッケージマネージャーapt-getchocowinget、または直接インストーラーの利用

Windows 用ブループリントの作成

単一プラットフォーム用ブループリント

リポジトリが Windows のみを対象とする場合は、トップレベルで runs-on: windows を利用します。
runs-on: windows

initialize:
  - name: "Install Node.js"
    uses: github.com/actions/setup-node@v4
    with:
      node-version: "20"

  - name: "Install build tools"
    run: |
      choco install visualstudio2022buildtools -y
      choco install python --version=3.12 -y

maintenance: |
  npm install

knowledge:
  - name: lint
    contents: npm run lint
  - name: test
    contents: npm test
  - name: build
    contents: npm run build

マルチプラットフォームのブループリント

Linux と Windows の両方で同じリポジトリをビルドするには、複数ブロックの YAML 形式を利用します。各ブロックで、それぞれ独自の runs-on ラベルを指定します。
- runs-on: default
  initialize: |
    curl -LsSf https://astral.sh/uv/install.sh | sh
    apt-get update && apt-get install -y build-essential

  maintenance: |
    uv sync

  knowledge:
    - name: test
      contents: uv run pytest

- runs-on: windows
  initialize: |
    choco install python --version=3.12 -y

  maintenance: |
    uv sync

  knowledge:
    - name: test
      contents: uv run pytest
各ブロックごとに、そのプラットフォーム向けのスナップショットのビルドが個別に生成されます。セッションは、プラットフォーム固有のスナップショットから起動します。

runs-on フィールド

runs-on フィールドは、アカウントに登録されているマシン構成に対応します。
ValuePlatform
default or linuxLinux (デフォルトのプラットフォーム)
windowsWindows
runs-on は、文字列またはリストで指定できます。
# 単一プラットフォーム
runs-on: windows

# 1つのブロックに複数のプラットフォームを指定(同じコマンドが各プラットフォームで実行される)
runs-on: [default, windows]
ブロックに複数のプラットフォームが列挙されている場合、ビルドシステムは同じコマンドを使って、各プラットフォームごとに1つのスナップショットを作成します。
リスト構文では、リスト内のすべてのプラットフォームで同一のコマンドが実行されます。コマンドが真にクロスプラットフォーム対応である場合にのみ利用してください (例: npm installuv sync) 。プラットフォーム固有のコマンド (Linux の apt-get や Windows の choco など) には、代わりに マルチブロック形式 を利用してください。プラットフォームごとに1ブロック使用します。

Windows セッションの動作

Shell

Windowsセッションでは、デフォルトのシェルとして Git Bash を使用します。これは Linux で使われているものと同じ bash シェルです。標準的な bash 構文は、どちらのプラットフォームでもそのまま使えます。
- run: |
    export MY_VAR="hello"
    echo $MY_VAR

パス

Windows では Git Bash のパス形式 (C:\... ではなく /c/...) を使用します:
# Linuxのパス
- run: cp config.json ~/.config/myapp/config.json

# Windowsのパス(Git Bash形式)
- run: cp config.json /c/Users/Administrator/.config/myapp/config.json

シークレット

セッション中は、標準的な bash 構文 ($SECRET_NAME) でシークレットを環境変数として利用できます。
maintenance:
  - name: "Configure registry"
    run: |
      npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN

添付ファイル

Windows では、アップロードされたファイルは /home/ubuntu/.files/ ではなく、/c/Users/Administrator/.files/ に書き込まれます。

Windows 用ブループリントのヒント

ツールのインストール

choco (Chocolatey) 、winget、または直接ダウンロード用のスクリプトを利用します:
initialize:
  - name: "Install Chocolatey packages"
    run: |
      choco install git -y
      choco install nodejs-lts -y
      choco install python --version=3.12 -y

  - name: "Install with winget"
    run: |
      winget install --id Microsoft.DotNet.SDK.8 --accept-source-agreements --accept-package-agreements

よくあるパターン

.NET プロジェクト:
runs-on: windows

initialize:
  - name: "Install .NET SDK"
    run: |
      winget install --id Microsoft.DotNet.SDK.8 --accept-source-agreements --accept-package-agreements

maintenance: |
  dotnet restore

knowledge:
  - name: build
    contents: dotnet build
  - name: test
    contents: dotnet test
  - name: lint
    contents: dotnet format --verify-no-changes
Visual Studio / C++ プロジェクト:
runs-on: windows

initialize:
  - name: "Install Visual Studio Build Tools"
    run: |
      choco install visualstudio2022buildtools -y
      choco install visualstudio2022-workload-vctools -y

maintenance: |
  msbuild /t:Restore MySolution.sln

knowledge:
  - name: build
    contents: msbuild MySolution.sln /p:Configuration=Release
  - name: test
    contents: vstest.console.exe bin/Release/Tests.dll