Separate FFI and Base layer to see failures independently
@@ -36,8 +36,8 @@ concurrency:
cancel-in-progress: true
jobs:
- cucumber_tests:
- name: Cucumber tests
+ base_layer:
+ name: Cucumber tests / Base Layer
runs-on: [self-hosted, ubuntu18.04-high-cpu]
steps:
- name: checkout
@@ -60,9 +60,6 @@ jobs:
CI_BINS=${{ inputs.ci_bins }}
echo "Run binary - ${CI_BINS}"
echo "CI_BINS=${CI_BINS:-true}" >> $GITHUB_ENV
- CI_FFI=${{ inputs.ci_ffi }}
- echo "Run FFI - ${CI_FFI}"
- echo "CI_FFI=${CI_FFI:-true}" >> $GITHUB_ENV
fi
- name: Setup rust toolchain
@@ -117,3 +114,70 @@ jobs:
--package tari_integration_tests
-- -t "@ffi and ${{ env.CI_PROFILE }} and not @broken"
--retry 2
+ ffi:
+ name: Cucumber tests / FFI
+ runs-on: [self-hosted, ubuntu18.04-high-cpu]
+ steps:
+ - name: checkout
+ uses: actions/checkout@v3
+
+ - name: Envs setup
+ id: envs_setup
+ shell: bash
+ run: |
+ if [ "${{ github.event_name }}" == "schedule" ] ; then
+ echo "CI_FFI=false" >> $GITHUB_ENV
+ if [ "${{ github.event.schedule }}" == "0 2 * * *" ] ; then
+ echo "CI_PROFILE=not @long-running" >> $GITHUB_ENV
+ elif [ "${{ github.event.schedule }}" == "0 12 * * 6" ] ; then
+ echo "CI_PROFILE=@long-running" >> $GITHUB_ENV
+ fi
+ else
+ echo "CI ..."
+ echo "CI_PROFILE=@critical and not @long-running" >> $GITHUB_ENV
+ CI_FFI=${{ inputs.ci_ffi }}
+ echo "Run FFI - ${CI_FFI}"
+ echo "CI_FFI=${CI_FFI:-true}" >> $GITHUB_ENV
+ fi
+
+ - name: Setup rust toolchain
+ if: ${{ env.CI_FFI == 'true' }}
+ uses: actions-rs/toolchain@v1
+ with:
+ profile: minimal
+ components: rustfmt, clippy
+ toolchain: ${{ env.toolchain }}
+ override: true
+
+ - name: Install ubuntu dependencies
+ if: ${{ env.CI_FFI == 'true' }}
+ shell: bash
+ run: |
+ sudo apt-get update
+ sudo bash scripts/install_ubuntu_dependencies.sh
+
+ - name: Cache cargo files and outputs
+ if: ${{ env.CI_FFI == 'true' }}
+ uses: Swatinem/rust-cache@v2
+
+ - name: cargo test compile
+ if: ${{ env.CI_FFI == 'true' }}
+ uses: actions-rs/cargo@v1
+ with:
+ command: test
+ args: --no-run --locked --all-features --release ${{ env.TARGET_BINS }}
+
+ - name: Run ${{ env.CI_PROFILE }} integration tests for ffi
+ if: ${{ env.CI_FFI == 'true' }}
+ timeout-minutes: 90
+ uses: actions-rs/cargo@v1
+ with:
+ command: test
+ args: >
+ --test cucumber
+ -v
+ --all-features
+ --release
+ --package tari_integration_tests
+ -- -t "@ffi and ${{ env.CI_PROFILE }} and not @broken"
+ --retry 2
