Skip to content

Commit

Permalink
fixups Enable testing in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
NelsonVides committed Nov 20, 2023
1 parent 8c931ba commit 472ecbb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,23 @@ jobs:
with:
path: ~/.cache/rebar3
key: rebar3-cache-for-os-${{matrix.os}}-otp-${{matrix.otp}}-rebar3-${{matrix.rebar3}}-hash-${{hashFiles('rebar.lock')}}

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
if: ${{ matrix.os == 'windows-2022' }}
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1.12.1
if: ${{ matrix.os == 'windows-2022' }}
- name: vcpkg build
uses: johnwason/vcpkg-action@v5
with:
pkgs: openssl
triplet: x64-windows-release
token: ${{ github.token }}
if: ${{ matrix.os == 'windows-2022' }}
# - name: Install OpenSSL
# run: powershell.exe .\.github\workflows\Install-OpenSSL.ps1
# if: ${{ matrix.os == 'windows-2022' }}

- run: rebar3 as test get-deps
- run: rebar3 as test compile
Expand Down
4 changes: 2 additions & 2 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"$CFLAGS -std=c99 -O0 -g -Wall -Wextra -fPIC --coverage"},
{"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin|gnu)",
"$LDLIBS -lcrypto --coverage"},
{"win32", "CFLAGS", "$CFLAGS /O0 /DNDEBUG /Wall"},
{"win32", "CFLAGS", "$CFLAGS /I${OPENSSL_INSTALL_DIR}/include /O2 /DNDEBUG /Wall"},
{"win32", "LDLIBS", "$LDLIBS libcrypto.lib"}
]
}
Expand All @@ -35,7 +35,7 @@
"CFLAGS", "$CFLAGS -std=c99 -O3 -g -Wall -Wextra -fPIC"},
{"(linux|solaris|freebsd|netbsd|openbsd|dragonfly|darwin|gnu)",
"LDLIBS", "$LDLIBS -lcrypto"},
{"win32", "CFLAGS", "$CFLAGS /O2 /DNDEBUG /Wall"},
{"win32", "CFLAGS", "$CFLAGS /I${OPENSSL_INSTALL_DIR}/include /O2 /DNDEBUG /Wall"},
{"win32", "LDLIBS", "$LDLIBS libcrypto.lib"},
{"DRV_LINK_TEMPLATE", "$DRV_LINK_TEMPLATE $LDLIBS"}
]
Expand Down

0 comments on commit 472ecbb

Please sign in to comment.