Skip to content

Pass -y into apt install #29

Pass -y into apt install

Pass -y into apt install #29

Workflow file for this run

# DO NOT MERGE THIS INTO main BRANCH
name: release-test
on:
push:
branches:
- nmv/add-musl-target-to-artifacts
env:
REPO_NAME: ${{ github.repository_owner }}/era-test-node
CARGO_TERM_COLOR: always
jobs:
build:
name: build release
strategy:
matrix:
arch: [x86_64-unknown-linux-gnu]
include:
- arch: x86_64-unknown-linux-gnu
platform: ubuntu-20.04
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Get latest version of stable Rust
run: rustup update stable
- name: Install target
run: rustup target add ${{ matrix.arch }}
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
# ==============================
# Builds
# ==============================
- name: Build era-test-node for ${{ matrix.arch }}
run: |
cargo install cross
make build-${{ matrix.arch }}
- name: Rename and move binary
run: |
mkdir artifacts
mv target/${{ matrix.arch }}/release/era_test_node ./artifacts
- name: Create artifacts
run: |
cd artifacts
tar -czf era_test_node-${{ matrix.arch }}.tar.gz era_test_node*
mv *tar.gz* ..
# =======================================================================
# Upload artifacts
# This is required to share artifacts between different jobs
# =======================================================================
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: era_test_node-${{ matrix.arch }}.tar.gz
path: era_test_node-${{ matrix.arch }}.tar.gz
- name: Upload signature
uses: actions/upload-artifact@v3
with:
name: era_test_node-${{ matrix.arch }}.tar.gz.asc
path: era_test_node-${{ matrix.arch }}.tar.gz.asc
test-package:
name: validate test release
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
fetch-depth: 0
# ==============================
# Download artifacts
# ==============================
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: era_test_node-x86_64-unknown-linux-gnu.tar.gz
- name: Start the era_test_node
id: start_node
run: |
echo "Extracting era_test_node binary"
tar -xzf era_test_node-x86_64-unknown-linux-gnu.tar.gz
chmod +x era_test_node
echo "Starting node in background"
./era_test_node run 2>&1 | tee era_test_node_ouput.log &
echo "PID=$!" >> $GITHUB_ENV
- name: Launch tests
id: launch
run: |
echo "Run tests"
make test-e2e
- name: Stop the era_test_node and print output logs
id: stop_node
if: always()
run: |
cat era_test_node_ouput.log
kill $PID