ci: combine build and test in one job #10
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: Run Tests | |
| # on: | |
| # workflow_run: | |
| # workflows: [ Build ] | |
| # types: | |
| # - completed | |
| on: | |
| push: | |
| branches: [ koreshin/self-hosted-runner ] | |
| env: | |
| build_dir: "build" | |
| config: "Release" | |
| artifact: "native" | |
| nt: "4" | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: self-hosted | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| fetch-depth: 0 | |
| # - uses: seanmiddleditch/gha-setup-ninja@master | |
| - name: Configure CMake | |
| run: cmake . -G Ninja -B ${{ env.build_dir }} -DCMAKE_BUILD_TYPE=${{ env.config }} | |
| env: | |
| CC: gcc-13 | |
| CXX: g++-13 | |
| - name: Build library sources | |
| run: cmake --build ${{ env.build_dir }} | |
| - name: Upload binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-${{env.artifact}} | |
| path: ${{env.build_dir}}/libspla_x64.so | |
| deploy: | |
| name: Run tests | |
| needs: build | |
| runs-on: self-hosted | |
| # if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| steps: | |
| - name: Run tests | |
| run: python3 ./run_tests.py --build-dir=${{ env.build_dir }} |