Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added windows arm64 build to pipeline #83

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 27 additions & 11 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-gnullvm
- os: macos-latest
package_name: macos-aarch64
- os: macos-13
Expand All @@ -39,13 +42,18 @@ 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-gnullvm") {
vcpkg install openssl:arm64-windows-static-md
} else {
vcpkg install openssl:x64-windows-static-md
}

- name: Install OpenSSL (Macos)
if: matrix.os == 'macos-latest'
Expand All @@ -55,23 +63,26 @@ jobs:
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

# - name: Run tests
# run: cargo test --release
run: |
if [ "${{ matrix.target }}" != "" ]; then
cargo build --release --target ${{ matrix.target }}
else
cargo build --release
fi
shell: bash

- name: Create release directory
run: mkdir -p release
Expand All @@ -81,10 +92,15 @@ 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-gnullvm") {
cp target/aarch64-pc-windows-gnullvm/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'
if: matrix.os == 'windows-latest'
env:
WINDOWS_PFX_FILE: ${{ secrets.WIN_CERTIFICATE }}
WINDOWS_PFX_PASSWORD: ${{ secrets.WIN_CERTIFICATE_PWD }}
Expand Down
Loading
Loading