Skip to content

Commit

Permalink
[implant] Introduce windows arm64 implant (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-julien committed Dec 1, 2024
1 parent 2e47e5b commit 9bdda9d
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,49 @@ jobs:
key: cargo-{{ arch }}-{{ checksum "Cargo.toml" }}
paths:
- ~/.cargo
windows_arm_64_compile:
machine: true
resource_class: openbas-platform/openbas-agent-windows-64bits-arm
shell: 'powershell.exe -ExecutionPolicy Bypass'
steps:
- checkout
- restore_cache:
keys:
- cargo-{{ arch }}-{{ checksum "Cargo.toml" }}
- cargo-{{ arch }}
- run: curl.exe -SL --output vs_buildtools.exe --url https://aka.ms/vs/17/release/vs_buildtools.exe
- run: ./vs_buildtools.exe --add Microsoft.VisualStudio.Component.Clang --add Microsoft.VisualStudio.Component.VC.tools.arm64 --wait --includeRecommended --quiet --norestart
- run: curl.exe --output rustup-init.exe --url https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe
- run: ./rustup-init.exe -vy
- run: Invoke-Expression '& "$env:USERPROFILE\.cargo\bin\rustup" toolchain install stable-aarch64-pc-windows-msvc'
- run: Invoke-Expression '& "$env:USERPROFILE\.cargo\bin\rustup" default stable-aarch64-pc-windows-msvc'
- run: $env:PATH = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\Llvm\ARM64\bin;" + $env:PATH; Invoke-Expression '& "$env:USERPROFILE\.cargo\bin\cargo" build --release'
- save_cache:
key: cargo-{{ arch }}-{{ checksum "Cargo.toml" }}
paths:
- ~/.cargo
windows_arm_64_build:
machine: true
resource_class: openbas-platform/openbas-agent-windows-64bits-arm
shell: 'powershell.exe -ExecutionPolicy Bypass'
steps:
- checkout
- restore_cache:
keys:
- cargo-{{ arch }}-{{ checksum "Cargo.toml" }}
- cargo-{{ arch }}
- run: curl.exe -SL --output vs_buildtools.exe --url https://aka.ms/vs/17/release/vs_buildtools.exe
- run: ./vs_buildtools.exe --add Microsoft.VisualStudio.Component.Clang --add Microsoft.VisualStudio.Component.VC.tools.arm64 --wait --includeRecommended --quiet --norestart
- run: curl.exe --output rustup-init.exe --url https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe
- run: ./rustup-init.exe -vy
- run: Invoke-Expression '& "$env:USERPROFILE\.cargo\bin\rustup" toolchain install stable-aarch64-pc-windows-msvc'
- run: Invoke-Expression '& "$env:USERPROFILE\.cargo\bin\rustup" default stable-aarch64-pc-windows-msvc'
- run: $env:PATH = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\Llvm\ARM64\bin;" + $env:PATH; Invoke-Expression '& "$env:USERPROFILE\.cargo\bin\cargo" build --release'
- run: $env:version = if ($env:CIRCLE_TAG) { $env:CIRCLE_TAG } else { "latest" }; curl.exe -u [email protected]:$env:JFROG_TOKEN -T ./target/release/openbas-implant.exe "https://filigran.jfrog.io/artifactory/openbas-implant/windows/arm64/openbas-implant-$env:version.exe"
- save_cache:
key: cargo-{{ arch }}-{{ checksum "Cargo.toml" }}
paths:
- ~/.cargo
linux_x86_64_compile:
machine:
image: ubuntu-2204:current
Expand Down Expand Up @@ -206,6 +249,18 @@ workflows:
only: /[0-9]+(\.[0-9]+)+(\.[0-9]+)*/
branches:
only: main
- windows_arm_64_compile:
filters:
tags:
ignore: /.*/
branches:
ignore: main
- windows_arm_64_build:
filters:
tags:
only: /[0-9]+(\.[0-9]+)+(\.[0-9]+)*/
branches:
only: main
- linux_x86_64_compile:
filters:
tags:
Expand Down

0 comments on commit 9bdda9d

Please sign in to comment.