Skip to content

Commit

Permalink
added windows arm64 build to pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr Gadorek committed Jan 6, 2025
1 parent 5242fac commit c0663a6
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions .github/workflows/build_rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
package_name: linux-x64
- os: windows-latest
package_name: windows-x64
- os: windows-latest
package_name: windows-arm64
target: aarch64-pc-windows-msvc
- os: macos-latest
package_name: macos-aarch64
- os: macos-13
Expand All @@ -39,36 +42,47 @@ jobs:
with:
toolchain: stable
override: true
target: ${{ matrix.target }}

- name: Install OpenSSL (Windows)
if: runner.os == 'Windows'
shell: powershell
run: |
echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
vcpkg install openssl:x64-windows-static-md
if ("${{ matrix.target }}" -eq "aarch64-pc-windows-msvc") {
vcpkg install openssl:arm64-windows-static-md
} else {
vcpkg install openssl:x64-windows-static-md
}
- name: Install OpenSSL (Macos)
if: matrix.os == 'macos-latest'
run: brew install openssl

- name: Cache cargo registry
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry
key: ${{ runner.os }}-${{ matrix.target }}-cargo-registry
restore-keys: |
${{ runner.os }}-cargo-registry
${{ runner.os }}-${{ matrix.target }}-cargo-registry
- name: Cache cargo index
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index
key: ${{ runner.os }}-${{ matrix.target }}-cargo-index
restore-keys: |
${{ runner.os }}-cargo-index
${{ runner.os }}-${{ matrix.target }}-cargo-index
- name: Build
run: cargo build --release
run: |
if [ "${{ matrix.target }}" != "" ]; then
cargo build --release --target ${{ matrix.target }}
else
cargo build --release
fi
shell: bash

# - name: Run tests
# run: cargo test --release
Expand All @@ -81,7 +95,12 @@ jobs:

- name: Copy binary to release directory Windows
if: matrix.os == 'windows-latest'
run: cp target/release/eim.exe release/${{ matrix.package_name }}/eim.exe
run: |
if ("${{ matrix.target }}" -eq "aarch64-pc-windows-msvc") {
cp target/aarch64-pc-windows-msvc/release/eim.exe release/${{ matrix.package_name }}/eim.exe
} else {
cp target/release/eim.exe release/${{ matrix.package_name }}/eim.exe
}
- name: Sign Windows Binary
if: matrix.platform == 'windows-latest'
Expand Down

0 comments on commit c0663a6

Please sign in to comment.