ci: build Rust on Windows as part of CI (#665)
While we aren't ready to provide Windows binaries of Codex CLI, it seems like a good idea to ensure we guard platform-specific code appropriately.
This commit is contained in:
15
.github/workflows/rust-ci.yml
vendored
15
.github/workflows/rust-ci.yml
vendored
@@ -5,6 +5,7 @@ on:
|
|||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- "codex-rs/**"
|
- "codex-rs/**"
|
||||||
|
- ".github/**"
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
@@ -41,6 +42,8 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
# Note: While Codex CLI does not support Windows today, we include
|
||||||
|
# Windows in CI to ensure the code at least builds there.
|
||||||
include:
|
include:
|
||||||
- runner: macos-14
|
- runner: macos-14
|
||||||
target: aarch64-apple-darwin
|
target: aarch64-apple-darwin
|
||||||
@@ -50,6 +53,8 @@ jobs:
|
|||||||
target: x86_64-unknown-linux-musl
|
target: x86_64-unknown-linux-musl
|
||||||
- runner: ubuntu-24.04
|
- runner: ubuntu-24.04
|
||||||
target: x86_64-unknown-linux-gnu
|
target: x86_64-unknown-linux-gnu
|
||||||
|
- runner: windows-latest
|
||||||
|
target: x86_64-pc-windows-msvc
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -82,10 +87,8 @@ jobs:
|
|||||||
run: cargo test --target ${{ matrix.target }} || echo "FAILED=${FAILED:+$FAILED, }cargo test" >> $GITHUB_ENV
|
run: cargo test --target ${{ matrix.target }} || echo "FAILED=${FAILED:+$FAILED, }cargo test" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Fail if any step failed
|
- name: Fail if any step failed
|
||||||
|
if: env.FAILED != ''
|
||||||
run: |
|
run: |
|
||||||
if [ -n "$FAILED" ]; then
|
echo "See logs above, as the following steps failed:"
|
||||||
echo -e "See logs above, as the following steps failed:\n$FAILED"
|
echo "$FAILED"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
|
||||||
env:
|
|
||||||
FAILED: ${{ env.FAILED }}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user