diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae7e52e..9f01cb6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,67 +17,68 @@ jobs: steps: - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJson(env) }} - run: echo "$GITHUB_CONTEXT" + - name: Checkout source code + uses: actions/checkout@v2 - # - name: Checkout source code - # uses: actions/checkout@v2 + - name: Add ARM architecture to APT + run: sudo dpkg --add-architecture armhf - # - name: Add ARM architecture to APT - # run: sudo dpkg --add-architecture armhf + - name: Setup APT repositories for ARM + run: sudo mv sources.list /etc/apt/sources.list - # - name: Setup APT repositories for ARM - # run: sudo mv sources.list /etc/apt/sources.list + - name: Update APT repositories + run: sudo apt-get update - # - name: Update APT repositories - # run: sudo apt-get update + - name: Install ARM cross compiler + run: sudo apt-get -y install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf - # - name: Install ARM cross compiler - # run: sudo apt-get -y install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf + - name: Install dependencies + run: sudo apt-get -y install libssl-dev:armhf - # - name: Install dependencies - # run: sudo apt-get -y install libssl-dev:armhf + - name: Generate makefiles for ARM + run: ./genMakefiles armlinux2 - # - name: Generate makefiles for ARM - # run: ./genMakefiles armlinux2 + - name: Compile + run: make - # - name: Compile - # run: make + - name: Upload Build Artifacts + uses: actions/upload-artifact@v1 + with: + name: rtpserver + path: rtspserver/rtspserver - # - name: Release (pre-release) - # if: env.isReleaseCandidate == 'true' - # uses: ncipollo/release-action@v1 - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # prerelease: true - # artifacts: rtspserver/rtspserver + - name: Release (pre-release) + if: env.isReleaseCandidate == 'true' + uses: ncipollo/release-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + prerelease: true + artifacts: rtspserver/rtspserver - # - name: Update latest-rc tag - # if: env.isReleaseCandidate == 'true' - # uses: ncipollo/release-action@v1 - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # tag: latest-rc - # allowUpdates: true - # replacesArtifacts: true - # prerelease: true - # artifacts: rtspserver/rtspserver + - name: Update latest-rc tag + if: env.isReleaseCandidate == 'true' + uses: ncipollo/release-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + tag: latest-rc + allowUpdates: true + replacesArtifacts: true + prerelease: true + artifacts: rtspserver/rtspserver - # - name: Release (final) - # if: env.isFinalRelease == 'true' - # uses: ncipollo/release-action@v1 - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # artifacts: rtspserver/rtspserver + - name: Release (final) + if: env.isFinalRelease == 'true' + uses: ncipollo/release-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + artifacts: rtspserver/rtspserver - # - name: Update latest tag - # if: env.isFinalRelease == 'true' - # uses: ncipollo/release-action@v1 - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # tag: latest - # allowUpdates: true - # replacesArtifacts: true - # artifacts: rtspserver/rtspserver + - name: Update latest tag + if: env.isFinalRelease == 'true' + uses: ncipollo/release-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + tag: latest + allowUpdates: true + replacesArtifacts: true + artifacts: rtspserver/rtspserver \ No newline at end of file