Skip to content

Use custom container for x86_64 builds #8

Use custom container for x86_64 builds

Use custom container for x86_64 builds #8

Workflow file for this run

name: Build
on: [push]
jobs:
arm-bemos-linux-musleabihf:
runs-on: ubuntu-latest
container: ghcr.io/bestsens/musl-build-image:latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup cache
uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Setup
run: |
rustup default stable
rustup target add armv7-unknown-linux-musleabihf
- name: Build
env:
CC: arm-bemos-linux-musleabihf-gcc
run: |
cargo build --release --target=armv7-unknown-linux-musleabihf
- name: Clean up hierachy
run: cp LICENSE target/armv7-unknown-linux-musleabihf/release/LICENSE
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: armv7
path: |
target/armv7-unknown-linux-musleabihf/release/bone_shell
target/armv7-unknown-linux-musleabihf/release/LICENSE
x86_64-linux-gnu:
runs-on: ubuntu-latest
container: ghcr.io/bestsens/rust-build-image:latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup cache
uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Setup
run: |
apt-get update
apt-get install -y cmake
- name: Build
run: |
cargo build --release
- name: Clean up hierachy
run: cp LICENSE target/release/LICENSE
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: x86_64
path: |
target/release/bone_shell
target/release/LICENSE
x86_64-pc-windows-gnu:
runs-on: ubuntu-latest
container: ghcr.io/bestsens/rust-build-image:latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup cache
uses: actions/cache@v4
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Setup
run: |
apt-get update
apt-get install -y mingw-w64 cmake
rustup target add x86_64-pc-windows-gnu
- name: Build
run: |
cargo build --release --target=x86_64-pc-windows-gnu
- name: Clean up hierachy
run: cp LICENSE target/x86_64-pc-windows-gnu/release/LICENSE
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: x84_64-windows
path: |
target/x86_64-pc-windows-gnu/release/bemos_s3uploader.exe
target/x86_64-pc-windows-gnu/release/LICENSE