Skip to content

Commit 2b289f9

Browse files
EwoutHlu-zero
authored andcommitted
CI: Add Windows Arm64 job
Adds a Windows job targeting the Arm64 platform. Moves Nasm installation to ilammy/setup-nasm and upgrades to Cargo-C v0.7.3
1 parent 8e8c9c7 commit 2b289f9

File tree

1 file changed

+22
-23
lines changed

1 file changed

+22
-23
lines changed

.github/workflows/rav1e.yml

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -393,20 +393,17 @@ jobs:
393393
sccache --stop-server
394394
395395
build-windows:
396-
397396
strategy:
398397
matrix:
399-
conf:
400-
- cargo-build
401-
- cargo-test
402-
- cargo-c
403398
include:
404399
- conf: cargo-build
405-
toolchain: stable
400+
target: x86_64-pc-windows-msvc
401+
- conf: cargo-build
402+
target: aarch64-pc-windows-msvc
406403
- conf: cargo-test
407-
toolchain: stable
404+
target: x86_64-pc-windows-msvc
408405
- conf: cargo-c
409-
toolchain: stable-x86_64-pc-windows-gnu
406+
target: x86_64-pc-windows-gnu
410407

411408
env:
412409
RUST_BACKTRACE: full
@@ -417,42 +414,44 @@ jobs:
417414
if: >-
418415
(github.event_name == 'push' && !endsWith(github.event.head_commit.message, 'CI: skip')) ||
419416
(github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.names, 'skip-ci'))
420-
421417
runs-on: windows-latest
422418

423419
steps:
424420
- uses: actions/checkout@v2
421+
- uses: ilammy/setup-nasm@v1
425422
- name: Install sccache
426423
run: |
427424
$LINK = "https://github.com/mozilla/sccache/releases/download/0.2.12"
428425
$SCCACHE_FILE = "sccache-0.2.12-x86_64-pc-windows-msvc"
429426
curl -LO "$LINK/$SCCACHE_FILE.tar.gz"
430427
tar xzf "$SCCACHE_FILE.tar.gz"
431428
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
440429
- name: Set MSVC x86_64 linker path
430+
if: matrix.target != 'aarch64-pc-windows-msvc'
441431
run: |
442432
$LinkGlob = "VC\Tools\MSVC\*\bin\Hostx64\x64"
443433
$env:PATH = "$env:PATH;${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer"
444434
$LinkPath = vswhere -latest -products * -find "$LinkGlob" | Select-Object -Last 1
445435
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
446443
- name: Install ${{ matrix.toolchain }}
447444
uses: actions-rs/toolchain@v1
448445
with:
449446
profile: minimal
450-
toolchain: ${{ matrix.toolchain }}
447+
toolchain: stable
448+
target: ${{ matrix.target }}
451449
override: true
450+
default: true
452451
- name: Install cargo-c
453452
if: matrix.conf == 'cargo-c'
454453
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"
456455
$CARGO_C_FILE = "cargo-c-windows-msvc"
457456
curl -LO "$LINK/$CARGO_C_FILE.zip"
458457
7z e -y "$CARGO_C_FILE.zip" -o"${env:USERPROFILE}\.cargo\bin"
@@ -465,17 +464,17 @@ jobs:
465464
continue-on-error: true
466465
with:
467466
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') }}
469468
restore-keys: |
470-
${{ runner.os }}-${{ matrix.conf }}-cargo-registry-
469+
${{ runner.os }}-${{ matrix.conf }}-${{ matrix.target }}-cargo-registry-
471470
- name: Cache sccache output
472471
uses: actions/cache@v2
473472
continue-on-error: true
474473
with:
475474
path: C:\sccache
476-
key: ${{ runner.os }}-${{ matrix.conf }}-sccache-${{ hashFiles('**/Cargo.*') }}
475+
key: ${{ runner.os }}-${{ matrix.conf }}-${{ matrix.target }}-sccache-${{ hashFiles('**/Cargo.*') }}
477476
restore-keys: |
478-
${{ runner.os }}-${{ matrix.conf }}-sccache-
477+
${{ runner.os }}-${{ matrix.conf }}-${{ matrix.target }}-sccache-
479478
- name: Start sccache server
480479
run: |
481480
sccache --start-server

0 commit comments

Comments
 (0)