Skip to content

Commit b637d4a

Browse files
committed
[poc_windows_arm_64_compile] First try
1 parent 4b549c8 commit b637d4a

File tree

1 file changed

+81
-1
lines changed

1 file changed

+81
-1
lines changed

.github/workflows/poc-agent-build.yml

Lines changed: 81 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,84 @@ jobs:
6969
- name: Cargo Test
7070
run: |
7171
cargo install cargo-cache
72-
cargo-cache -a clean-unref
72+
cargo-cache -a clean-unref
73+
74+
75+
poc_windows_arm_64_compile:
76+
name: poc_windows_arm_64_compile
77+
runs-on: windows-11-arm
78+
79+
steps:
80+
- name: Checkout repository
81+
uses: actions/checkout@v2
82+
83+
- name: Cache cargo
84+
uses: actions/cache@v4
85+
with:
86+
path: ~/.cargo
87+
key: ${{ runner.arch }}-${{ runner.os }}-cargo-cache-${{ hashFiles('**/Cargo.lock') }}
88+
restore-keys: |
89+
${{ runner.arch }}-${{ runner.os }}-cargo-cache-
90+
91+
- name: Download VS Build Tools
92+
run: curl.exe -SL --output vs_buildtools.exe --url https://aka.ms/vs/17/release/vs_buildtools.exe
93+
94+
- name: Install VS Components
95+
run: .\vs_buildtools.exe --add Microsoft.VisualStudio.Component.Clang --add Microsoft.VisualStudio.Component.VC.tools.arm64 --wait --includeRecommended --quiet --norestart
96+
shell: powershell
97+
98+
- name: Download Rustup-init
99+
run: curl.exe --output rustup-init.exe --url https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe
100+
101+
- name: Install Rustup
102+
run: .\rustup-init.exe -vy
103+
104+
- name: Install Rust Toolchain
105+
run: Invoke-Expression '& "$env:USERPROFILE\.cargo\bin\rustup" toolchain install stable-aarch64-pc-windows-msvc'
106+
shell: powershell
107+
108+
- name: Set Default Rust Toolchain
109+
run: Invoke-Expression '& "$env:USERPROFILE\.cargo\bin\rustup" default stable-aarch64-pc-windows-msvc'
110+
shell: powershell
111+
112+
- name: Install Quality Tools
113+
run: |
114+
$env:PATH = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\Llvm\ARM64\bin;" + $env:PATH;
115+
rustup component add clippy
116+
rustup component add rustfmt
117+
cargo install cargo-audit
118+
shell: powershell
119+
120+
- name: Run Cargo Checks
121+
run: |
122+
$env:PATH = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\Llvm\ARM64\bin;" + $env:PATH;
123+
Invoke-Expression '& "$env:USERPROFILE\.cargo\bin\cargo" check'
124+
Invoke-Expression '& "$env:USERPROFILE\.cargo\bin\cargo" clippy -- -D warnings'
125+
Invoke-Expression '& "$env:USERPROFILE\.cargo\bin\cargo" fmt -- --check'
126+
shell: powershell
127+
128+
- name: Config Git for HTTPS
129+
run: git config --global --unset url.ssh://[email protected]
130+
131+
- name: Run Cargo Audit
132+
run: cargo audit
133+
134+
- name: Reset Git Config
135+
run: git config --global url.ssh://[email protected] https://github.com/
136+
137+
- name: Cargo Build
138+
run: |
139+
$env:PATH = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\Llvm\ARM64\bin;" + $env:PATH;
140+
Invoke-Expression '& "$env:USERPROFILE\.cargo\bin\cargo" build --release'
141+
shell: powershell
142+
143+
- name: Cargo Test
144+
run: |
145+
$env:PATH = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\Llvm\ARM64\bin;" + $env:PATH;
146+
Invoke-Expression '& "$env:USERPROFILE\.cargo\bin\cargo" test --release'
147+
shell: powershell
148+
149+
- name: Clean Unreferenced Cargo
150+
run: |
151+
cargo install cargo-cache
152+
cargo-cache -a clean-unref

0 commit comments

Comments
 (0)