Skip to content

Commit

Permalink
[CICD] linux x86_64 setup as action.
Browse files Browse the repository at this point in the history
  • Loading branch information
Liam Monninger authored and Liam Monninger committed Sep 24, 2023
1 parent 087f650 commit 5419a5c
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 31 deletions.
16 changes: 16 additions & 0 deletions .github/actions/setup-linux-x86_64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 'Setup Linux x86_64'
description: 'Sets up the environment for Linux x86_64 builds with Rust'

runs:
using: 'composite'
steps:

- name: Install build essentials
run: sudo apt-get update && sudo apt-get install -y build-essential lld
shell: bash

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.70
14 changes: 3 additions & 11 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,14 @@ jobs:
labels: movement-runner

steps:

- name: Checkout Repository
uses: actions/checkout@v2
with:
submodules: 'recursive'

- name: Install build essentials
run: sudo apt-get update && sudo apt-get install -y build-essential lld

- name: Print Linker Version
run: ld --version

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.70
- name: Setup
uses: ./.github/actions/setup-linux-x86_64.yml

- name: Cache cargo registry
uses: actions/cache@v2
Expand Down
19 changes: 6 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,8 @@ jobs:
with:
submodules: 'recursive'

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.70.0

- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential
- name: Install aarch64 target
run: rustup target add aarch64-unknown-linux-gnu
- name: Setup
uses: ./.github/actions/setup-linux-x86_64.yml

- name: Debugging Info
run: |
Expand Down Expand Up @@ -101,6 +90,7 @@ jobs:
asset_name: movement-x86_64-linux
asset_content_type: application/octet-stream


pre-release-x86_64-mac:
if: false # not yet supported
needs: prepare-release
Expand Down Expand Up @@ -203,6 +193,7 @@ jobs:
asset_name: movement-aarch64-linux
asset_content_type: application/octet-stream


pre-release-aarch64-mac:
if: false # not yet supported
needs: prepare-release
Expand Down Expand Up @@ -254,6 +245,7 @@ jobs:
asset_name: movement-aarch64-mac
asset_content_type: application/octet-stream


pre-release-x86_64-windows:
if: false # not yet supported
needs: prepare-release
Expand Down Expand Up @@ -299,6 +291,7 @@ jobs:
asset_path: ./m1/target/release/movement
asset_name: movement-x86_64-windows
asset_content_type: application/octet-stream


build-and-docker:
if:
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,19 @@ jobs:
labels: movement-runner
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout code

- name: Checkout Repository
uses: actions/checkout@v2
with:
submodules: 'recursive'

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.70.0
- name: Setup
uses: ./.github/actions/setup-linux-x86_64.yml

- name: Build and Test Subnet
run: |
cd ./m1
RUSTFLAGS="--cfg tokio_unstable" cargo test --lib # this should only be the lib tests
# cargo test --lib # this should only be the lib tests
- name: Update Badge
run: |
Expand Down

0 comments on commit 5419a5c

Please sign in to comment.