-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build_job: | ||
# The host should always be linux | ||
runs-on: ubuntu-22.04 | ||
name: Build on ubuntu22.04 armhf | ||
|
||
# Run steps on a matrix of 4 arch/distro combinations | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: uraimo/run-on-arch-action@v2 | ||
name: Build artifact | ||
id: build | ||
with: | ||
arch: armv7 | ||
distro: ubuntu22.04 | ||
|
||
# Not required, but speeds up builds | ||
githubToken: ${{ github.token }} | ||
|
||
# Create an artifacts directory | ||
setup: | | ||
mkdir -p "${PWD}/artifacts" | ||
# Mount the artifacts directory as /artifacts in the container | ||
dockerRunArgs: | | ||
--volume "${PWD}/artifacts:/artifacts" | ||
# Pass some environment variables to the container | ||
env: | # YAML, but pipe character is necessary | ||
artifact_name: git-${{ matrix.distro }}_${{ matrix.arch }} | ||
# The shell to run commands with in the container | ||
shell: /bin/sh | ||
|
||
# Install some dependencies in the container. This speeds up builds if | ||
# you are also using githubToken. Any dependencies installed here will | ||
# be part of the container image that gets cached, so subsequent | ||
# builds don't have to re-install them. The image layer is cached | ||
# publicly in your project's package repository, so it is vital that | ||
# no secrets are present in the container state or logs. | ||
install: | | ||
apt-get update -q -y | ||
apt-get install -q -y git | ||
# Produce a binary artifact and place it in the mounted volume | ||
run: | | ||
cp $(which git) "/artifacts/${artifact_name}" | ||
echo "Produced artifact at /artifacts/${artifact_name}" | ||
- name: Show the artifact | ||
# Items placed in /artifacts in the container will be in | ||
# ${PWD}/artifacts on the host. | ||
run: | | ||
ls -al "${PWD}/artifacts" |