added deprecation notice #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: C/C++ CI | |
on: | |
push: | |
release: | |
types: [ published ] | |
jobs: | |
build-and-test: | |
name: build | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
os: [windows-2022, ubuntu-22.04, macos-12] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: configure cmake | |
run: mkdir build-dir && cd build-dir && cmake -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/artifacts .. | |
- name: build | |
run: cmake --build build-dir --parallel | |
- name: install | |
run: cmake --build build-dir --target install | |
- if: matrix.os == 'windows-2022' | |
name: Test run | |
run: | | |
netsh advfirewall firewall add rule name="unabto_unittest" dir=in action=allow program="${{ github.workspace }}\artifacts\bin\unabto_unittest.exe" enable=yes | |
${{ github.workspace }}/artifacts/bin/unabto_unittest | |
- if: matrix.os != 'windows-2022' | |
name: Test run | |
run: ${{ github.workspace }}/artifacts/bin/unabto_unittest | |
- name: Upload artifacts | |
if: ${{ success() }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: artifacts_${{matrix.os}} | |
path: ${{ github.workspace }}/artifacts | |
if-no-files-found: warn | |
release-assets: | |
name: Release Assets | |
needs: build-and-test | |
runs-on: ubuntu-22.04 | |
permissions: | |
# allow assets to be uploaded to a release | |
contents: write | |
strategy: | |
matrix: | |
binary: [unabto_tunnel] | |
if: github.event_name == 'release' && success() | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: artifacts_ubuntu-22.04 | |
path: linux | |
- uses: actions/download-artifact@v2 | |
with: | |
name: artifacts_windows-2022 | |
path: windows | |
- uses: actions/download-artifact@v2 | |
with: | |
name: artifacts_macos-12 | |
path: macos | |
- name: List assets | |
run: ls -R | |
- name: Upload linux asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: linux/bin/${{ matrix.binary}} | |
asset_name: ${{ matrix.binary}}_linux | |
asset_content_type: application/octet-stream | |
- name: Upload windows asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: windows/bin/${{ matrix.binary}}.exe | |
asset_name: ${{ matrix.binary}}_windows.exe | |
asset_content_type: application/octet-stream | |
- name: Upload mac asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: macos/bin/${{ matrix.binary}} | |
asset_name: ${{ matrix.binary}}_macos | |
asset_content_type: application/octet-stream |