Skip to content

Commit

Permalink
add windows action
Browse files Browse the repository at this point in the history
  • Loading branch information
j-z10 committed Mar 29, 2024
1 parent ac2ba9b commit 72d8dc7
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,41 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install GmSSL dependencies
- name: Download GmSSL
run: |
git clone https://github.com/guanzhi/GmSSL.git
cd GmSSL && git checkout tags/v3.1.1
mkdir build && cd build && cmake ..
make && make test && sudo make install
git clone -b 'v3.1.1' --depth 1 https://github.com/guanzhi/GmSSL.git
- name: Install GmSSL on ubuntu and macos
if: ${{ startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos') }}
working-directory: ${{ github.workspace }}/GmSSL
run: |
mkdir build && cd build
cmake .. && make && make test && sudo make install
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
sudo ldconfig
elif [[ "$OSTYPE" == "darwin"* ]]; then
sudo update_dyld_shared_cache
fi
gmssl version
cd ../../
- name: Add nmake
if: ${{ startsWith(matrix.os, 'windows') }}
uses: ilammy/msvc-dev-cmd@v1
- name: Install GmSSL on windows
if: ${{ startsWith(matrix.os, 'windows') }}
working-directory: ${{ github.workspace }}/GmSSL
run: |
mkdir build && cd build
cmake .. -G "NMake Makefiles"
nmake && nmake test && nmake install
set path=%path%;${{ github.workspace }}\GmSSL\build\bin
gmssl version
- name: Install Python dependencies
run: |
python -m pip install poetry
Expand Down

0 comments on commit 72d8dc7

Please sign in to comment.