mirror of
https://github.com/microsoft/edit.git
synced 2026-06-14 06:43:49 -05:00
49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: windows-2022
|
|
strategy:
|
|
matrix:
|
|
toolchain:
|
|
- nightly
|
|
arch:
|
|
- x64
|
|
- arm64
|
|
steps:
|
|
# The Windows runners have autocrlf enabled by default.
|
|
- name: Disable git autocrlf
|
|
run: git config --global core.autocrlf false
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Install nightly
|
|
run: |
|
|
rustup toolchain install --no-self-update --profile minimal --component rust-src -- nightly
|
|
rustup default nightly
|
|
rustup target add ${{ matrix.arch == 'arm64' && 'aarch64-pc-windows-msvc' || 'x86_64-pc-windows-msvc' }}
|
|
- name: Test
|
|
if: matrix.arch == 'x64'
|
|
run: cargo test
|
|
- name: Build
|
|
run: |
|
|
if ("${{ matrix.arch }}" -eq "arm64") {
|
|
.\tools\build_release_windows.bat --target aarch64-pc-windows-msvc
|
|
} else {
|
|
.\tools\build_release_windows.bat
|
|
}
|
|
- name: Upload
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: Windows ${{ matrix.arch }}
|
|
path: |
|
|
${{ github.workspace }}/target/${{ matrix.arch == 'arm64' && 'aarch64-pc-windows-msvc/release' || 'release' }}/edit.exe
|
|
${{ github.workspace }}/target/${{ matrix.arch == 'arm64' && 'aarch64-pc-windows-msvc/release' || 'release' }}/edit.pdb
|