Skip to content

Commit

Permalink
chore: update CI pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Jan 9, 2023
1 parent 6d5e224 commit 64f39e6
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
41 changes: 39 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
- uses: dart-lang/setup-dart@v1

- name: Install dependencies
Expand All @@ -23,6 +28,38 @@ jobs:
- name: Analyze project source
run: dart analyze

- name: Recompile tinydtls binary for Linux
if: matrix.os == 'ubuntu-latest'
run: |
cd third_party/tinydtls
./autogen.sh
./configure
make
cd ../..
mv third_party/tinydtls/libtinydtls.so libtinydtls.so
- name: Recompile tinydtls binary for Windows
if: matrix.os == 'windows-latest'
run: |
cd third_party/tinydtls
cmake -G "Unix Makefiles" -DBUILD_SHARED_LIBS=true .
make
cd ../..
mv third_party/tinydtls/libtinydtls.dll tinydtls.dll
- name: Recompile tinydtls binary for macOS
if: matrix.os == 'macos-latest'
run: |
# Remove the signature of the dart binary
# See https://github.com/dart-lang/sdk/issues/38314
codesign --remove-signature $DART_HOME/bin/dart
cd third_party/tinydtls
cmake -G "Unix Makefiles" -DBUILD_SHARED_LIBS=true .
make
cd ../..
cp third_party/tinydtls/*.dylib .
- name: Run tests with coverage
run: dart test --coverage="coverage"

Expand Down
Binary file removed libtinydtls.dll
Binary file not shown.
Binary file removed libtinydtls.so
Binary file not shown.

0 comments on commit 64f39e6

Please sign in to comment.