move bridge close timer start #57
Workflow file for this run
This file contains hidden or 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: CMake on multiple platforms | |
| on: | |
| push: | |
| tags: [ "*" ] | |
| jobs: | |
| build-simapi: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, debian-latest, debian-stable] | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set build dir | |
| id: strings | |
| shell: bash | |
| run: | | |
| echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
| github_sha_hash=${{ github.sha }} | |
| echo "github-sha-short=${github_sha_hash:0:7}" >> $GITHUB_OUTPUT | |
| - name: Update apt | |
| run: sudo apt update | |
| - name: Install Dependencies | |
| run: sudo apt install -y libuv1-dev libargtable2-dev libconfig-dev libyder-dev | |
| - name: Configure CMake | |
| run: > | |
| cmake -B ${{ steps.strings.outputs.build-output-dir }} | |
| -DCMAKE_CXX_COMPILER=g++ | |
| -DCMAKE_C_COMPILER=gcc | |
| -DCMAKE_BUILD_TYPE=Release | |
| -DBUILD_SIMD=ON | |
| -S ${{ github.workspace }} | |
| - name: Build | |
| run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Release | |
| - name: Build simapi debian package | |
| run: | | |
| rm -rf SIMAPI_PKG_SOURCE | |
| mkdir SIMAPI_PKG_SOURCE | |
| mkdir -p SIMAPI_PKG_SOURCE/DEBIAN | |
| mkdir -p SIMAPI_PKG_SOURCE/usr/lib/x86_64-linux-gnu/ | |
| cp ./tools/distro/debian/dpkg/${{ matrix.os }}/simapi_control ./SIMAPI_PKG_SOURCE/DEBIAN/control | |
| cp -r \ | |
| build/libsimapi.so \ | |
| build/libsimapi.so.1 \ | |
| build/libsimapi.so.1.0.1 \ | |
| SIMAPI_PKG_SOURCE/usr/lib/x86_64-linux-gnu/ | |
| dpkg-deb --build SIMAPI_PKG_SOURCE simapi-${{ matrix.os }}.deb | |
| - name: Build simd debian package | |
| run: | | |
| rm -rf SIMD_PKG_SOURCE | |
| mkdir SIMD_PKG_SOURCE | |
| mkdir -p SIMD_PKG_SOURCE/DEBIAN | |
| mkdir -p SIMD_PKG_SOURCE/usr/bin/ | |
| cp ./tools/distro/debian/dpkg/${{ matrix.os }}/simd_control ./SIMD_PKG_SOURCE/DEBIAN/control | |
| cp build/simd/simd ./SIMD_PKG_SOURCE/usr/bin/simd | |
| dpkg-deb --build SIMD_PKG_SOURCE simd-${{ matrix.os }}.deb | |
| - name: Release the Package | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: simapi-${{ matrix.os }}.deb | |
| - name: Release the Package | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: simd-${{ matrix.os }}.deb | |
| build-simapi-rpms: | |
| strategy: | |
| matrix: | |
| os: [fedora-43] | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: create rpmbuild dirs | |
| run: mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} | |
| - name: get spec file | |
| run: curl -o ~/simapi.spec https://raw.githubusercontent.com/Spacefreak18/simapi/refs/heads/master/tools/distro/fedora/rpm/simapi.spec | |
| - name: run spec file | |
| run: rpmbuild -ba ~/simapi.spec | |
| - name: rename file | |
| run: cp ~/rpmbuild/RPMS/x86_64/libsimapi-0.0.5-1.x86_64.rpm $GITHUB_WORKSPACE/libsimapi-${{ matrix.os }}.rpm | |
| - name: get spec file | |
| run: curl -o ~/simd.spec https://raw.githubusercontent.com/Spacefreak18/simapi/refs/heads/master/tools/distro/fedora/rpm/simd.spec | |
| - name: run spec file | |
| run: rpmbuild -ba ~/simd.spec | |
| - name: rename file | |
| run: cp ~/rpmbuild/RPMS/x86_64/simd-0.0.5-1.x86_64.rpm $GITHUB_WORKSPACE/simd-${{ matrix.os }}.rpm | |
| - name: Release libsimapi Package | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: libsimapi-${{ matrix.os }}.rpm | |
| - name: Release simd Package | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: simd-${{ matrix.os }}.rpm | |
| build-simapi-nix: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 | |
| - uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a | |
| with: | |
| arguments: ".#simapi" | |
| - name: Set build dir | |
| id: strings | |
| shell: bash | |
| run: | | |
| echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
| github_sha_hash=${{ github.sha }} | |
| echo "github-sha-short=${github_sha_hash:0:7}" >> $GITHUB_OUTPUT | |
| - name: Configure CMake | |
| run: > | |
| cmake -B ${{ steps.strings.outputs.build-output-dir }} | |
| -DCMAKE_CXX_COMPILER=g++ | |
| -DCMAKE_C_COMPILER=gcc | |
| -DCMAKE_BUILD_TYPE=Release | |
| -DBUILD_SIMD=OFF | |
| -S ${{ github.workspace }} | |
| - name: Build | |
| run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Release | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: simapi-build | |
| path: ${{ steps.strings.outputs.build-output-dir }} | |
| - name: Prepare release | |
| run: | | |
| mkdir simapi_release | |
| cp -r \ | |
| include \ | |
| build/libsimapi.so \ | |
| build/libsimapi.so.1 \ | |
| build/libsimapi.so.1.0.1 \ | |
| build/simapi.pc \ | |
| simapi_release/ | |
| cd simapi_release | |
| tar -czvf simapi.tar.gz ./* | |
| - name: Set tarball name | |
| if: github.ref_type == 'tag' | |
| run: | | |
| cd simapi_release | |
| mv simapi.tar.gz simapi-${{ github.ref_name }}.tar.gz | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| if: github.ref_type == 'tag' | |
| with: | |
| name: SimAPI ${{ github.ref_name }} | |
| fail_on_unmatched_files: true | |
| files: | | |
| simapi_release/simapi-${{ github.ref_name }}.tar.gz | |
| build-simd-nix: | |
| runs-on: ubuntu-latest | |
| needs: build-simapi | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 | |
| - uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a | |
| with: | |
| arguments: ".#simd" | |
| - name: Download Artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: simapi-build | |
| - name: Set build dir | |
| id: strings | |
| shell: bash | |
| run: | | |
| echo "build-output-dir=${{ github.workspace }}/simd/build" >> "$GITHUB_OUTPUT" | |
| github_sha_hash=${{ github.sha }} | |
| echo "github-sha-short=${github_sha_hash:0:7}" >> $GITHUB_OUTPUT | |
| - name: Configure CMake | |
| run: > | |
| cmake -B ${{ steps.strings.outputs.build-output-dir }} | |
| -DCMAKE_CXX_COMPILER=g++ | |
| -DCMAKE_C_COMPILER=gcc | |
| -DCMAKE_BUILD_TYPE=Release | |
| -S ${{ github.workspace }}/simd | |
| - name: Build | |
| run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Release | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| if: github.ref_type == 'tag' | |
| with: | |
| name: Simd ${{ github.ref_name }} | |
| fail_on_unmatched_files: true | |
| files: | | |
| simd/build/simd | |