Skip to content

Commit

Permalink
Fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
jareddlc committed Sep 13, 2024
1 parent 2a8d919 commit 636762d
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 64 deletions.
103 changes: 50 additions & 53 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
name: Release
name: Push

on: push
on:
push:
branches-ignore: [ main ]

env:
CARGO_TERM_COLOR: always

jobs:
# build_linux:
# runs-on: ubuntu-latest
build_linux:
runs-on: ubuntu-latest

# steps:
# - name: Checkout
# uses: actions/checkout@v4
steps:
- name: Checkout
uses: actions/checkout@v4

# - name: Build
# run: cargo build --release
- name: Build
run: cargo build --release

# - name: Upload Linux Artifact
# uses: actions/upload-artifact@v4
# with:
# name: linux-binary
# path: target/release/libgut_cert_check.so
- name: Upload Linux Artifact
uses: actions/upload-artifact@v4
with:
name: linux-binary
path: target/release/libgut_cert_check.so

build_windows:
runs-on: windows-2019
Expand All @@ -26,19 +31,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Deps
run: choco install --yes openssl

- name: Test 1
run: |
cd "C:\Program Files\OpenSSL-Win64\lib"
dir
- name: Build
run: |
$env:OPENSSL_LIB_DIR="C:\Program Files\OpenSSL-Win64\lib"
$env:OPENSSL_INCLUDE_DIR="C:\Program Files\OpenSSL-Win64\include"
$env:OPENSSL_DIR="C:\Program Files\OpenSSL-Win64"
$env:OPENSSL_LIB_DIR="C:\Program Files\OpenSSL\lib"
$env:OPENSSL_INCLUDE_DIR="C:\Program Files\OpenSSL\include"
$env:OPENSSL_DIR="C:\Program Files\OpenSSL"
cargo build --release
- name: Upload Windows Artifact
Expand All @@ -47,40 +44,40 @@ jobs:
name: windows-binary
path: target\release\gut_cert_check.dll

# build_macos_x86:
# runs-on: macos-latest
build_macos_x86:
runs-on: macos-latest

# steps:
# - name: Checkout
# uses: actions/checkout@v4
steps:
- name: Checkout
uses: actions/checkout@v4

# - name: Build
# run: cargo build --release
- name: Build
run: cargo build --release

# - name: Rename binary
# run: mv target/release/libgut_cert_check.dylib target/release/libgut_cert_check-x86.dylib
- name: Rename binary
run: mv target/release/libgut_cert_check.dylib target/release/libgut_cert_check-x86.dylib

# - name: Upload MacOS Artifact
# uses: actions/upload-artifact@v4
# with:
# name: macos-x86-binary
# path: target/release/libgut_cert_check-x86.dylib
- name: Upload MacOS Artifact
uses: actions/upload-artifact@v4
with:
name: macos-x86-binary
path: target/release/libgut_cert_check-x86.dylib

# build_macos_aarch64:
# runs-on: macos-14
build_macos_aarch64:
runs-on: macos-14

# steps:
# - name: Checkout
# uses: actions/checkout@v4
steps:
- name: Checkout
uses: actions/checkout@v4

# - name: Build
# run: cargo build --release
- name: Build
run: cargo build --release

# - name: Rename binary
# run: mv target/release/libgut_cert_check.dylib target/release/libgut_cert_check-aarch64.dylib
- name: Rename binary
run: mv target/release/libgut_cert_check.dylib target/release/libgut_cert_check-aarch64.dylib

# - name: Upload MacOS Artifact
# uses: actions/upload-artifact@v4
# with:
# name: macos-aarch64-binary
# path: target/release/libgut_cert_check-aarch64.dylib
- name: Upload MacOS Artifact
uses: actions/upload-artifact@v4
with:
name: macos-aarch64-binary
path: target/release/libgut_cert_check-aarch64.dylib
14 changes: 3 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Deps
run: choco install --yes openssl

- name: Test 1
run: |
cd "C:\Program Files\OpenSSL-Win64\lib"
dir
- name: Build
run: |
$env:OPENSSL_LIB_DIR="C:\Program Files\OpenSSL-Win64\lib"
$env:OPENSSL_INCLUDE_DIR="C:\Program Files\OpenSSL-Win64\include"
$env:OPENSSL_DIR="C:\Program Files\OpenSSL-Win64"
$env:OPENSSL_LIB_DIR="C:\Program Files\OpenSSL\lib"
$env:OPENSSL_INCLUDE_DIR="C:\Program Files\OpenSSL\include"
$env:OPENSSL_DIR="C:\Program Files\OpenSSL"
cargo build --release
- name: Upload Windows Artifact
Expand Down

0 comments on commit 636762d

Please sign in to comment.