Skip to content

adjust

adjust #7923

name: Build All Targets
on:
push:
paths-ignore:
- "adr/**"
- "deploy/**"
- ".github/**"
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true
jobs:
build-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
# remove this once the latest ubuntu image has been rolled out
- name: Fix APT mirror (working patch)
run: |
echo "Patching sources.list..."
sudo sed -i 's|mirror+file:/etc/apt/apt-mirrors.txt|http://archive.ubuntu.com/ubuntu|g' /etc/apt/sources.list
sudo apt-get clean
sudo apt-get update
- name: Install Dependencies
run: sudo apt install protobuf-compiler
- name: Cache Rust build
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809
id: cache-rust
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: rust-build-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
rust-build-${{ runner.os }}-
- name: Install Rust
run: rustup toolchain install 1.85.0
- name: Set Rust as default
run: rustup default 1.85.0
# Building tests in release mode checks warnings and compiler errors that depend on optimisations
- name: Build Tests
run: cargo build --release --all-features --tests
build-bins:
timeout-minutes: 40
runs-on:
labels: ubuntu-22.04-16core
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
# remove this once the latest ubuntu image has been rolled out
- name: Fix APT mirror (working patch)
run: |
echo "Patching sources.list..."
sudo sed -i 's|mirror+file:/etc/apt/apt-mirrors.txt|http://archive.ubuntu.com/ubuntu|g' /etc/apt/sources.list
sudo apt-get clean
sudo apt-get update
- name: Install Dependencies
run: sudo apt install protobuf-compiler
- name: Cache Rust build
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809
id: cache-rust
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: rust-build-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
rust-build-${{ runner.os }}-
- name: Install Rust
run: rustup toolchain install 1.85.0
- name: Set Rust as default
run: rustup default 1.85.0
- name: Build All Targets
run: cargo build --release --all-features --lib --bins --benches --examples