@@ -393,20 +393,17 @@ jobs:
393
393
sccache --stop-server
394
394
395
395
build-windows :
396
-
397
396
strategy :
398
397
matrix :
399
- conf :
400
- - cargo-build
401
- - cargo-test
402
- - cargo-c
403
398
include :
404
399
- conf : cargo-build
405
- toolchain : stable
400
+ target : x86_64-pc-windows-msvc
401
+ - conf : cargo-build
402
+ target : aarch64-pc-windows-msvc
406
403
- conf : cargo-test
407
- toolchain : stable
404
+ target : x86_64-pc-windows-msvc
408
405
- conf : cargo-c
409
- toolchain : stable- x86_64-pc-windows-gnu
406
+ target : x86_64-pc-windows-gnu
410
407
411
408
env :
412
409
RUST_BACKTRACE : full
@@ -417,42 +414,44 @@ jobs:
417
414
if : >-
418
415
(github.event_name == 'push' && !endsWith(github.event.head_commit.message, 'CI: skip')) ||
419
416
(github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.names, 'skip-ci'))
420
-
421
417
runs-on : windows-latest
422
418
423
419
steps :
424
420
- uses : actions/checkout@v2
421
+ - uses : ilammy/setup-nasm@v1
425
422
- name : Install sccache
426
423
run : |
427
424
$LINK = "https://github.com/mozilla/sccache/releases/download/0.2.12"
428
425
$SCCACHE_FILE = "sccache-0.2.12-x86_64-pc-windows-msvc"
429
426
curl -LO "$LINK/$SCCACHE_FILE.tar.gz"
430
427
tar xzf "$SCCACHE_FILE.tar.gz"
431
428
echo "$Env:GITHUB_WORKSPACE/$SCCACHE_FILE" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
432
- - name : Install nasm
433
- run : |
434
- $NASM_VERSION="2.15.05"
435
- $LINK = "https://www.nasm.us/pub/nasm/releasebuilds/$NASM_VERSION/win64"
436
- $NASM_FILE = "nasm-$NASM_VERSION-win64"
437
- curl --ssl-no-revoke -LO "$LINK/$NASM_FILE.zip"
438
- 7z e -y "$NASM_FILE.zip" -o"C:\nasm"
439
- echo "C:\nasm" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
440
429
- name : Set MSVC x86_64 linker path
430
+ if : matrix.target != 'aarch64-pc-windows-msvc'
441
431
run : |
442
432
$LinkGlob = "VC\Tools\MSVC\*\bin\Hostx64\x64"
443
433
$env:PATH = "$env:PATH;${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer"
444
434
$LinkPath = vswhere -latest -products * -find "$LinkGlob" | Select-Object -Last 1
445
435
echo "$LinkPath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
436
+ - name : Set MSVC Arm64 linker path
437
+ if : matrix.target == 'aarch64-pc-windows-msvc'
438
+ run : |
439
+ $LinkGlob = "VC\Tools\MSVC\*\bin\Hostx64\Arm64"
440
+ $env:PATH = "$env:PATH;${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer"
441
+ $LinkPath = vswhere -latest -products * -find "$LinkGlob" | Select-Object -Last 1
442
+ echo "$LinkPath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
446
443
- name : Install ${{ matrix.toolchain }}
447
444
uses : actions-rs/toolchain@v1
448
445
with :
449
446
profile : minimal
450
- toolchain : ${{ matrix.toolchain }}
447
+ toolchain : stable
448
+ target : ${{ matrix.target }}
451
449
override : true
450
+ default : true
452
451
- name : Install cargo-c
453
452
if : matrix.conf == 'cargo-c'
454
453
run : |
455
- $LINK = "https://github.com/lu-zero/cargo-c/releases/download/v0.7.1 "
454
+ $LINK = "https://github.com/lu-zero/cargo-c/releases/download/v0.7.3 "
456
455
$CARGO_C_FILE = "cargo-c-windows-msvc"
457
456
curl -LO "$LINK/$CARGO_C_FILE.zip"
458
457
7z e -y "$CARGO_C_FILE.zip" -o"${env:USERPROFILE}\.cargo\bin"
@@ -465,17 +464,17 @@ jobs:
465
464
continue-on-error : true
466
465
with :
467
466
path : ~/.cargo/registry/cache
468
- key : ${{ runner.os }}-${{ matrix.conf }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
467
+ key : ${{ runner.os }}-${{ matrix.conf }}-${{ matrix.target }}- cargo-registry-${{ hashFiles('**/Cargo.lock') }}
469
468
restore-keys : |
470
- ${{ runner.os }}-${{ matrix.conf }}-cargo-registry-
469
+ ${{ runner.os }}-${{ matrix.conf }}-${{ matrix.target }}- cargo-registry-
471
470
- name : Cache sccache output
472
471
uses : actions/cache@v2
473
472
continue-on-error : true
474
473
with :
475
474
path : C:\sccache
476
- key : ${{ runner.os }}-${{ matrix.conf }}-sccache-${{ hashFiles('**/Cargo.*') }}
475
+ key : ${{ runner.os }}-${{ matrix.conf }}-${{ matrix.target }}- sccache-${{ hashFiles('**/Cargo.*') }}
477
476
restore-keys : |
478
- ${{ runner.os }}-${{ matrix.conf }}-sccache-
477
+ ${{ runner.os }}-${{ matrix.conf }}-${{ matrix.target }}- sccache-
479
478
- name : Start sccache server
480
479
run : |
481
480
sccache --start-server
0 commit comments