Improve OS support #22
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: docker | |
| "on": | |
| pull_request: | |
| paths: | |
| - .github/workflows/docker.yml | |
| - Dockerfile | |
| - Dockerfile.windows | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: "${{ github.workflow }}-${{ github.ref }}" | |
| cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| linux: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 120 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # The image is large (every language toolchain + prefetched models. | |
| # The runner's root disk (~14 GB free) can't hold it. | |
| # Move Docker's storage to the ~70 GB /mnt scratch disk. | |
| - name: Move Docker storage to /mnt | |
| run: | | |
| sudo systemctl stop docker docker.socket | |
| sudo mkdir -p /mnt/docker | |
| echo '{"data-root":"/mnt/docker"}' | sudo tee /etc/docker/daemon.json | |
| sudo systemctl start docker | |
| docker info --format 'Docker Root Dir: {{.DockerRootDir}}' | |
| - name: Build the edge-toolkit test image | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| run: DOCKER_BUILDKIT=1 docker build --target test --secret id=gh_token,env=GITHUB_TOKEN -t edge-toolkit-test . | |
| - name: Run the test suite | |
| run: docker run --rm edge-toolkit-test | |
| windows: | |
| runs-on: windows-2022 | |
| timeout-minutes: 120 | |
| env: | |
| # The classic Windows builder can't substitute build-args into the Dockerfile's RUN, | |
| # and mise's prebuilt "latest" zip is stale (2026.3.0, too old for the config). | |
| MISE_VERSION: "2026.6.2" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # Hosted Windows runners don't reliably leave the Docker daemon running, so | |
| # the build can fail connecting to the docker_engine pipe. Start it (no-op | |
| # if already running) and confirm connectivity before building. | |
| - name: Start the Docker daemon | |
| run: | | |
| sc query docker | grep -q RUNNING || net start docker | |
| docker version | |
| - name: Stage mise and the token in the build context | |
| run: | | |
| v="${{ env.MISE_VERSION }}" | |
| curl -fsSL -o mise.zip "https://github.com/jdx/mise/releases/download/v$v/mise-v$v-windows-x64.zip" | |
| printf '%s' "${{ github.token }}" > gh_token | |
| # Build only through the `build` stage (mise + the full toolchain): that's | |
| # the current frontier -- the install pipeline is what we're proving on a | |
| # bare Nano Server. The later stages (prefetch/precompile/test/server) | |
| # mirror the Linux Dockerfile but aren't reached yet; bump --target as they | |
| # come green. | |
| - name: Build the Windows setup image | |
| run: docker build -f Dockerfile.windows --target build -t edge-toolkit-windows . |