Bump actions/checkout from 3 to 4 #144
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
--- | |
name: loop-test-build | |
#env: | |
## settings DEFAULTS | |
## clear-docker-cache: ${{ github.event.inputs.clear-docker-cache }} | |
### clear-docker-cache: ${{ inputs.backport_release == false && inputs.release_candidate == false }} | |
# clear-docker-cache: ${{ github.event.inputs.clear-docker-cache && github.event.inputs.clear-docker-cache != 'false' }} | |
## clear-docker-cache: 'false' | |
## build-with-CCACHE: ${{ github.event.inputs.build-with-CCACHE }} | |
# build-with-CCACHE: ${{ github.event.inputs.build-with-CCACHE && github.event.inputs.build-with-CCACHE != 'false' }} | |
## build-with-CCACHE: 'false' | |
## build-with-SCCACHE: ${{ github.event.inputs.build-with-SCCACHE }} | |
## build-with-SCCACHE: ${{ github.event.inputs.build-with-SCCACHE && github.event.inputs.build-with-SCCACHE != 'false' }} | |
# build-with-SCCACHE: ${{ github.event.inputs.build-with-SCCACHE && github.event.inputs.build-with-SCCACHE != 'false' || 'true' }} | |
# build-Everything: ${{ github.event.inputs.build-Everything && github.event.inputs.build-Everything != 'false' }} | |
# #ryanchapman-gha-ssh: ${{ github.event.inputs.ryanchapman-gha-ssh && github.event.inputs.ryanchapman-gha-ssh != 'false' }} | |
# ryanchapman-gha-ssh: 'false' | |
on: | |
push: | |
# branches: [ master ] | |
#paths-ignore: | |
# - '.github/workflows/**' | |
paths: | |
- '!.github/workflows/**' | |
- '.github/workflows/loop-test-build.yml' | |
workflow_dispatch: | |
inputs: | |
clear-docker-cache: | |
description: 'clear docker cache with rm -fr /tmp/.buildx-cache /tmp/.buildx-cache-old /tmp/.buildx-cache-new' | |
required: false | |
type: boolean | |
build-with-CCACHE: | |
description: 'build with build-with-CCACHE' | |
required: true | |
type: boolean | |
default: false | |
build-with-SCCACHE: | |
description: 'SCCACHE build-with-SCCACHE' | |
required: true | |
type: boolean | |
default: true | |
build-ARM: | |
description: 'build-ARM' | |
required: true | |
type: boolean | |
default: false | |
build-Everything: | |
description: 'build-Everything' | |
required: true | |
type: boolean | |
default: false | |
ryanchapman-gha-ssh: | |
description: 'ryanchapman-gha-ssh' | |
required: true | |
type: boolean | |
default: false | |
pull_request: | |
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-secrets | |
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication | |
permissions: | |
packages: read | |
contents: read | |
jobs: | |
cache: | |
name: Cache | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Cache permissions | |
run: | | |
sudo chown $(id -un) /var/cache/apt/archives | |
- name: Cache packages | |
uses: actions/cache@v3 | |
with: | |
path: /var/cache/apt/archives/*.deb | |
key: apt-cache-${{ github.run_id }}-${{ github.run_attempt }}-${{ hashFiles('/var/cache/apt/archives/*.deb') }} | |
restore-keys: | | |
apt-cache- | |
- name: Download packages | |
run: | | |
sudo apt update | |
sudo apt install -y -d -o Acquire::Retries=50 \ | |
mtools syslinux isolinux \ | |
libc6-dev-i386 valgrind \ | |
gcc-arm-none-eabi gcc-aarch64-linux-gnu \ | |
p7zip-full genisoimage syslinux-efi syslinux-utils xorriso | |
x86: | |
name: x86-loop-test | |
runs-on: ubuntu-22.04 | |
needs: cache | |
steps: | |
# FIXME BUG see https://github.com/actions/runner/issues/1483 | |
- if: ${{ github.event.inputs.clear-docker-cache && github.event.inputs.clear-docker-cache != 'false' }} | |
run: echo "clear-docker-cache=true" >> $GITHUB_ENV | |
############# | |
# select as default # - if: ${{ github.event.inputs.build-with-CCACHE && github.event.inputs.build-with-CCACHE != 'false' || github.event.inputs.build-with-SCCACHE != 'true' }} | |
- if: ${{ github.event.inputs.build-with-CCACHE && github.event.inputs.build-with-CCACHE != 'false' || github.event.inputs.build-with-SCCACHE != 'true' }} | |
# select not as default # - if: ${{ github.event.inputs.build-with-CCACHE && github.event.inputs.build-with-CCACHE != 'false' }} | |
run: echo "build-with-CCACHE=true" >> $GITHUB_ENV | |
############# | |
############# | |
# select as default # - if: ${{ github.event.inputs.build-with-SCCACHE && github.event.inputs.build-with-SCCACHE != 'false' || github.event.inputs.build-with-CCACHE != 'true' }} | |
# select not as default # - if: ${{ github.event.inputs.build-with-SCCACHE && github.event.inputs.build-with-SCCACHE != 'false' }} | |
- if: ${{ github.event.inputs.build-with-SCCACHE && github.event.inputs.build-with-SCCACHE != 'false' }} | |
############# | |
# - if: ${{ github.event.inputs.build-with-SCCACHE && github.event.inputs.build-with-SCCACHE != 'false' || 'true' }} | |
run: echo "build-with-SCCACHE=true" >> $GITHUB_ENV | |
- if: ${{ github.event.inputs.build-ARM && github.event.inputs.build-ARM != 'false' }} | |
run: echo "build-ARM=true" >> $GITHUB_ENV | |
- if: ${{ github.event.inputs.build-Everything && github.event.inputs.build-Everything != 'false' }} | |
run: echo "build-Everything=true" >> $GITHUB_ENV | |
- if: ${{ github.event.inputs.ryanchapman-gha-ssh && github.event.inputs.ryanchapman-gha-ssh != 'false' }} | |
run: echo "ryanchapman-gha-ssh=true" >> $GITHUB_ENV | |
# | |
# - if: ${{ github.event.inputs.OPT_REBUILD && github.event.inputs.OPT_REBUILD != 'false' }} | |
# run: echo "OPT_REBUILD=1" >> $GITHUB_OUTPUT | |
# - if: ${{ github.event.inputs.OPT_PACKAGE_ONLY && github.event.inputs.OPT_PACKAGE_ONLY != 'false' }} | |
# run: echo "OPT_PACKAGE_ONLY=1" >> $GITHUB_OUTPUT | |
# - if: ${{ github.event.inputs.OPT_PUSH_WHEN_FAIL && github.event.inputs.OPT_PUSH_WHEN_FAIL != 'false' }} | |
# run: echo "OPT_PUSH_WHEN_FAIL=1" >> $GITHUB_OUTPUT | |
# - if: ${{ github.event.inputs.OPT_IGNORE_ERRORS && github.event.inputs.OPT_IGNORE_ERRORS != 'false' }} | |
# run: echo "OPT_IGNORE_ERRORS=1" >> $GITHUB_OUTPUT | |
# - if: ${{ github.event.inputs.OPT_DEBUG && github.event.inputs.OPT_DEBUG != 'false' }} | |
# run: echo "OPT_DEBUG=1" >> $GITHUB_OUTPUT | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
repository: ipxe/ipxe | |
path: . | |
fetch-depth: 0 | |
- name: set my-runner-workspace for BUG workaround github.workspace and runner.workspace are incorrect inside container jobs #2058 | |
# BUG: github.workspace and runner.workspace are incorrect inside container jobs #2058 / see https://github.com/actions/runner/issues/2058 | |
run: echo "my-runner-workspace=${{ runner.workspace }}" >> $GITHUB_ENV | |
- name: Cache permissions | |
run: | | |
sudo chown $(id -un) /var/cache/apt/archives | |
- name: Cache packages | |
uses: actions/cache/restore@v3 | |
with: | |
path: /var/cache/apt/archives/*.deb | |
key: apt-cache-${{ github.run_id }}-${{ github.run_attempt }} | |
- name: Install packages | |
run: | | |
echo eatmydata | |
eatmydata ||: | |
sudo dpkg --add-architecture i386 | |
sudo apt update | |
sudo apt install \ | |
-y -o Acquire::Retries=50 \ | |
mtools syslinux isolinux \ | |
libc6-dev-i386 libc6-dbg:i386 valgrind \ | |
p7zip-full genisoimage mtools isolinux syslinux syslinux-efi syslinux-utils xorriso | |
- name: "build-with-SCCACHE != 'true'" | |
if: ${{ env.BUILD-WITH-SCCACHE != 'true' }} | |
run: | | |
echo build-with-SCCACHE | |
# https://github.com/Mozilla-Actions/sccache-action | |
- name: Run sccache-cache | |
if: ${{ env.build-with-SCCACHE == 'true' }} | |
uses: mozilla-actions/[email protected] | |
with: | |
version: "v0.4.2" | |
- name: Run sccache stat for check | |
if: ${{ env.build-with-SCCACHE == 'true' }} | |
shell: bash | |
run: ${SCCACHE_PATH} --show-stats | |
- name: sccache For C/C++ code, the following environment variables should be set | |
if: ${{ env.build-with-SCCACHE == 'true' }} | |
run: | | |
whereis gcc | |
echo "SCCACHE_GHA_VERSION=2" >> $GITHUB_ENV # By changing SCCACHE_GHA_VERSION, we can purge all the cache. https://github.com/mozilla/sccache/blob/main/docs/GHA.md | |
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV | |
# | |
# SCCACHE_GHA_CACHE_URL / ACTIONS_CACHE_URL GitHub Actions cache API URL | |
# SCCACHE_GHA_RUNTIME_TOKEN / ACTIONS_RUNTIME_TOKEN GitHub Actions access token | |
# SCCACHE_GHA_CACHE_TO cache key to write | |
# SCCACHE_GHA_CACHE_FROM comma separated list of cache keys to read from | |
# | |
## echo "SCCACHE_DIR=${{ runner.workspace }}/.sccache" >> $GITHUB_ENV | |
### By default it will use: ~/.cache/sccache on Linux, %LOCALAPPDATA%\Mozilla\sccache on Windows, and ~/Library/Caches/Mozilla.sccache on MacOS. | |
# echo "SCCACHE_IDLE_TIMEOUT=0" >> $GITHUB_ENV | |
### SCCACHE_IDLE_TIMEOUT how long the local daemon process waits for more client requests before exiting, in seconds. Set to 0 to run sccache permanently | |
echo "HOST_CC=${SCCACHE_PATH} /usr/bin/gcc" >> $GITHUB_ENV | |
echo "CC=${SCCACHE_PATH} /usr/bin/gcc" >> $GITHUB_ENV | |
echo "CXX=${SCCACHE_PATH} /usr/bin/gcc" >> $GITHUB_ENV | |
# echo "MAKEOPTs1=HOST_CC='$SCCACHE_PATH gcc'" >> $GITHUB_ENV | |
# echo "MAKEOPTs2=CC='$SCCACHE_PATH gcc'" >> $GITHUB_ENV | |
# echo "MAKEOPTs=HOST_CC='${SCCACHE_PATH} gcc' CC='${SCCACHE_PATH} gcc'" >> $GITHUB_ENV | |
# echo "MAKEOPTs=HOST_CC=\'${SCCACHE_PATH} gcc\' CC=\'${SCCACHE_PATH} gcc\'" >> $GITHUB_ENV | |
# echo "MAKEOPTs=HOST_CC=\"sccache gcc\" CC=\"sccache gcc\"" >> $GITHUB_ENV | |
- name: Add sccache warper1 | |
if: ${{ env.build-with-SCCACHE == 'true' }} | |
run: | | |
[[ -e update-sccache-symlinks.sh ]] || curl -LORJ https://github.com/berlin4apk/ccache-action/raw/dev/src/update-sccache-symlinks.sh | |
sudo chmod 755 update-sccache-symlinks.sh | |
sudo bash +e update-sccache-symlinks.sh ; echo $? | |
# [[ -e update-sccache-symlinks.sh ]] || curl -LORJ https://github.com/berlin4apk/ccache-action/raw/v1.2.105/src/update-ccache-symlinks.sh | |
# echo "9ba51f7f4983817980c4173282dd09cdba6b5d81d087852831d9ecb69a6cf7ad *update-ccache-symlinks.sh" | sha256sum -c - | |
### echo "/usr/lib/sccache" >> $GITHUB_PATH | |
- name: Add sccache warper2 | |
if: ${{ env.build-with-SCCACHEdisabeld == 'true' }} | |
run: | | |
# By default, sccache will fail your build if it fails to successfully communicate with its associated server. To have sccache instead gracefully failover to the local compiler without stopping, set the environment variable SCCACHE_IGNORE_SERVER_IO_ERROR=1. | |
echo build-with-SCCACHE | |
cat <<EOF > /usr/local/bin/CC | |
#!/bin/sh | |
#exec ccache "${TARGET_CC_NOCACHE}" "$@" | |
exec SCCACHE_GHA_ENABLED=true SCCACHE_ERROR_LOG=/tmp/sccache_log.txt SCCACHE_LOG=debug sccache gcc "$@" | |
EOF | |
chmod 755 /usr/local/bin/CC | |
cat <<EOF > /usr/local/bin/CXX | |
#!/bin/sh | |
#exec ccache "${TARGET_CXX_NOCACHE}" "$@" | |
exec SCCACHE_GHA_ENABLED=true SCCACHE_ERROR_LOG=/tmp/sccache_log.txt SCCACHE_LOG=debug sccache g++ "$@" | |
EOF | |
chmod 755 /usr/local/bin/CXX | |
sccache --start-server ||: | |
- name: install ccache | |
if: ${{ env.build-with-CCACHE == 'true' }} | |
#uses: berlin4apk/ccache-action@dev | |
#uses: berlin4apk/[email protected] | |
#uses: berlin4apk/[email protected] | |
uses: berlin4apk/[email protected] | |
with: | |
key: ${{ runner.os }}-${{ matrix.type }} | |
verbose: 2 # "Verbosity level: 0 (default), 1 or 2. Ignore for sccache." | |
max-size: 1000M # Max size of the cache, default: 501M | |
### compression-level: 0 # ccache compression-level, ccache 3.7.7 uses gzip: a Normal value is 6 (0-9), ccache 3.7.7 uses zstd: a Normal value is 0 (-5-19) see https://ccache.dev/manual/4.6.html#config_compression_level | |
install-from-github: true | |
variant: ccache # 'Ccache variant to use. Either "ccache" (the default) or "sccache" (see https://github.com/mozilla/sccache)' | |
# save: false # If 'false', do not save the cache, only restore. default: true | |
# ccache-dir: "~/.ccache" | |
# BUG: github.workspace and runner.workspace are incorrect inside container jobs #2058 / see https://github.com/actions/runner/issues/2058 | |
### run: echo "my-runner-workspace=${{ runner.workspace }}" >> $GITHUB_ENV | |
#ccache-dir: "${{ runner.workspace }}/.ccache" | |
# dont-do-config: false | |
- name: ccache For C/C++ code, the following environment variables should be set | |
if: ${{ env.build-with-CCACHE == 'true' }} | |
run: | | |
whereis gcc | |
#CCACHE_PATH=$(command -v ccache) | |
CCACHE_BIN=$(command -v ccache) | |
echo "CCACHE_BIN=${CCACHE_BIN}" >> $GITHUB_ENV | |
echo "HOST_CC=${CCACHE_BIN} /usr/bin/gcc" >> $GITHUB_ENV | |
echo "CC=${CCACHE_BIN} /usr/bin/gcc" >> $GITHUB_ENV | |
echo "CXX=${CCACHE_BIN} /usr/bin/gcc" >> $GITHUB_ENV | |
# echo "MAKEOPTs='HOST_CC="ccache gcc" CC="ccache gcc"' >> $GITHUB_ENV | |
- name: export -p | grep -i CCACHE SCCACHE CC CXX | |
### if: ${{ env.build-with-SCCACHE == 'true' }} | |
run: | | |
export -p | grep -i -E "CCACHE|SCCACHE|CC|CXX|PATH|MAKE" | |
- name: export -p | grep CCACHE SCCACHE CC CXX | |
### if: ${{ env.build-with-SCCACHE == 'true' }} | |
run: | | |
export -p | grep -i -E "CCACHE|SCCACHE|CC|CXX|PATH|MAKE" | |
sccache --show-stats ||: | |
ccache --show-config --show-stats --verbose --verbose ||: | |
# env: | |
# SCCACHE_GHA_ENABLED: "true" | |
# CC: "sccache gcc" | |
# CXX: "sccache gcc" | |
# With cmake, add the following argument: | |
# -DCMAKE_C_COMPILER_LAUNCHER=sccache | |
# -DCMAKE_CXX_COMPILER_LAUNCHER=sccache | |
# With gcc / configure, call it with: | |
# ./configure CC="sccache gcc" CXX="sccache gcc" | |
# With clang | |
# ./configure CC="sccache clang" CXX="sccache clang" | |
- name: build /tmp/test.c /tmp/test2.c | |
run: | | |
cat <<EOF > test3.c | |
#include <stdio.h> | |
void main() { | |
printf("hello world\n"); | |
} | |
EOF | |
cat <<EOF > test2.c | |
#include <stdio.h> | |
void foo() { | |
printf("hello world\n"); | |
} | |
EOF | |
### sudo rm /tmp/test.c /tmp/test2.c | |
cp -p test3.c test2.c /tmp/ | |
$CC /tmp/test3.c || gcc /tmp/test3.c | |
$CC /tmp/test3.c || gcc /tmp/test3.c | |
$CC /tmp/test3.c || gcc /tmp/test3.c | |
$CC /tmp/test.c || gcc /tmp/test.c ||: | |
$CC /tmp/test.c || gcc /tmp/test.c ||: | |
$CC -c /tmp/test3.c -o /tmp/test3.o || gcc -c /tmp/test3.c -o /tmp/test3.o | |
$CC -c /tmp/test3.c -o /tmp/test3.o || gcc -c /tmp/test3.c -o /tmp/test3.o | |
$CC -c /tmp/test3.c -o /tmp/test3.o || gcc -c /tmp/test3.c -o /tmp/test3.o | |
$CC -c /tmp/test2.c -o /tmp/test2.o || gcc -c /tmp/test2.c -o /tmp/test2.o | |
$CC -c /tmp/test2.c -o /tmp/test2.o || gcc -c /tmp/test2.c -o /tmp/test2.o | |
$CC -c /tmp/test.c -o /tmp/test.o || gcc -c /tmp/test.c -o /tmp/test.o ||: | |
$CC -c /tmp/test.c -o /tmp/test.o || gcc -c /tmp/test.c -o /tmp/test.o ||: | |
- name: Run sccache stat for check | |
if: ${{ env.build-with-SCCACHE == 'true' }} | |
shell: bash | |
run: ${SCCACHE_PATH} --show-stats | |
- name: Run ccache stat for check | |
if: ${{ env.build-with-CCACHE == 'true' }} | |
shell: bash | |
run: ${CCACHE_BIN} --show-config --show-stats --verbose --verbose | |
- name: Add ccache warper | |
if: ${{ env.build-with-CCACHE == 'true' }} | |
run: | | |
[[ -e update-ccache-symlinks.in ]] || curl -LORJ https://github.com/berlin4apk/ccache-action/raw/dev/third-party/debian-ccache/debian/update-ccache-symlinks.in | |
[[ -e update-ccache-symlinks.sh ]] || curl -LORJ https://github.com/berlin4apk/ccache-action/raw/dev/src/update-ccache-symlinks.sh | |
sudo chmod 755 update-ccache-symlinks.sh | |
sudo bash +e update-ccache-symlinks.sh ||: ; echo $? | |
# [[ -e update-sccache-symlinks.sh ]] || curl -LORJ https://github.com/berlin4apk/ccache-action/raw/v1.2.105/src/update-ccache-symlinks.sh | |
# echo "9ba51f7f4983817980c4173282dd09cdba6b5d81d087852831d9ecb69a6cf7ad *update-ccache-symlinks.sh" | sha256sum -c - | |
### echo "/usr/lib/sccache" >> $GITHUB_PATH | |
- name: echo PATH | |
run: | | |
echo "$PATH" | |
- name: Add ccache /usr/local/lib/ccache:/usr/lib/ccache:/usr/local/opt/ccache/libexec to GITHUB_PATH | |
if: ${{ env.DISABELD___build-with-CCACHE == 'true' }} | |
run: | | |
echo "/usr/local/lib/ccache:/usr/lib/ccache:/usr/local/opt/ccache/libexec" >> $GITHUB_PATH | |
ls -latr /usr/local/lib/ccache /usr/lib/ccache /usr/local/opt/ccache/libexec ||: | |
#- name: Add ccache /usr/local/lib/ccache:/usr/lib/ccache:/usr/local/opt/ccache/libexec to GITHUB_PATH | |
- name: Add sccache /usr/local/lib/sccache to GITHUB_PATH | |
if: ${{ env.DISABELD___build-with-SCCACHE == 'true' }} | |
run: | | |
#echo "/usr/local/lib/sccache:/usr/lib/sccache:/usr/local/opt/sccache/libexec" >> $GITHUB_PATH | |
echo "/usr/local/lib/sccache" >> $GITHUB_PATH | |
ls -latr /usr/local/lib/sccache /usr/lib/sccache ||: | |
- name: echo PATH | |
run: | | |
echo "$PATH" | |
set -vx | |
ls -latr /opt/hostedtoolcache/sccache/*/*/ ||: | |
# https://github.com/ipxe/ipxe/discussions/614#discussioncomment-2363937 | |
# @mcb30 on Mar 15, 2022 | |
# The default build will give you a BIOS image. To build an EFI image, you will need to do something like make bin-x86_64-efi/ipxe.iso. | |
# | |
# For the record: the prebuilt ISO published at https://boot.ipxe.org/ipxe.iso is a combination of the BIOS, x86_64 EFI, and Aarch64 EFI images, built using the equivalent of: | |
# make bin/ipxe.lkrn bin-x86_64-efi/ipxe.efi | |
# make bin-arm64-efi/ipxe.efi CROSS=aarch64-linux-gnu- | |
# ./util/genfsimg -o ipxe.iso bin/ipxe.lkrn bin-x86_64-efi/ipxe.efi bin-arm64-efi/ipxe.efi | |
# | |
# The Makefile does not currently support building this combined ISO in one step as a single target, since it involves compiling for multiple CPU architectures. | |
- name: Build (BIOS) | |
#export PATH="/usr/local/lib/ccache:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
run: | | |
set -vx | |
make HOST_CC="$HOST_CC" CC="$CC" -j $((`nproc`+0)) -C src | |
- name: Run sccache stat for check | |
if: ${{ env.build-with-SCCACHE == 'true' }} | |
shell: bash | |
run: ${SCCACHE_PATH} --show-stats | |
- name: Run ccache stat for check | |
if: ${{ env.build-with-CCACHE == 'true' }} | |
shell: bash | |
run: ${CCACHE_BIN} --show-config --show-stats --verbose --verbose | |
- name: Build (efi) | |
#export PATH="/usr/local/lib/ccache:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
run: | | |
set -vx | |
make HOST_CC="${HOST_CC}" CC="${CC}" -j $((`nproc`+0)) -C src \ | |
bin-i386-efi/ipxe.efi \ | |
bin-x86_64-efi/ipxe.efi \ | |
bin/ipxe.lkrn | |
- name: Run sccache stat for check | |
if: ${{ env.build-with-SCCACHE == 'true' }} | |
shell: bash | |
run: ${SCCACHE_PATH} --show-stats | |
- name: Run ccache stat for check | |
if: ${{ env.build-with-CCACHE == 'true' }} | |
shell: bash | |
run: ${CCACHE_BIN} --show-config --show-stats --verbose --verbose | |
- name: Install packages arm gcc | |
if: ${{ env.build-ARM == 'true' }} | |
run: | | |
sudo apt update | |
sudo apt install -y -o Acquire::Retries=50 \ | |
mtools syslinux isolinux genisoimage xorriso mtools \ | |
gcc-arm-none-eabi \ | |
gcc-aarch64-linux-gnu \ | |
g++-9-aarch64-linux-gnu | |
- name: Build ARM32 | |
if: ${{ env.build-ARM == 'true' }} | |
#export PATH="/usr/local/lib/ccache:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
run: | | |
make $MAKEOPTs -j $((`nproc`+0)) -C src CROSS=arm-none-eabi- \ | |
bin-arm32-efi/intel.efi \ | |
bin-arm32-efi/intel.usb \ | |
bin-arm32-efi/intel.iso | |
- name: Run sccache stat for check | |
if: ${{ env.build-with-SCCACHE == 'true' }} | |
shell: bash | |
run: ${SCCACHE_PATH} --show-stats | |
- name: Run ccache stat for check | |
if: ${{ env.build-with-CCACHE == 'true' }} | |
shell: bash | |
run: ${CCACHE_BIN} --show-config --show-stats --verbose --verbose | |
- name: Build ARM64 | |
if: ${{ env.build-ARM == 'true' }} | |
#export PATH="/usr/local/lib/ccache:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
run: | | |
make $MAKEOPTs -j $((`nproc`+0)) -C src CROSS=aarch64-linux-gnu- \ | |
bin-arm64-efi/ipxe.efi \ | |
bin-arm64-efi/ipxe.usb \ | |
bin-arm64-efi/ipxe.iso | |
- name: Run sccache stat for check | |
if: ${{ env.build-with-SCCACHE == 'true' }} | |
shell: bash | |
run: ${SCCACHE_PATH} --show-stats | |
- name: Run ccache stat for check | |
if: ${{ env.build-with-CCACHE == 'true' }} | |
shell: bash | |
run: ${CCACHE_BIN} --show-config --show-stats --verbose --verbose | |
- name: Install for ISO build | |
run: | | |
sudo apt install -y -o Acquire::Retries=50 \ | |
mtools syslinux isolinux \ | |
p7zip-full genisoimage mtools isolinux syslinux syslinux-efi syslinux-utils xorriso | |
- name: Build ISO only BIOS | |
if: ${{ env.build-ARM != 'true' }} | |
#export PATH="/usr/local/lib/ccache:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
run: | | |
find . \( -name "*.lkrn" -or -name "*.efi" -or -name "*.iso" \) \( ! -name "Makefile*" \) -print | |
cd src && ./util/genfsimg -o ipxe.iso -s menu.ipxe \ | |
bin-i386-efi/ipxe.efi \ | |
bin-x86_64-efi/ipxe.efi \ | |
bin/ipxe.lkrn || \ | |
./util/genfsimg -o ipxe-any.iso bin-*-efi/ipxe.efi bin/ipxe.lkrn | |
- name: Build ISO with BIOS and ARM | |
if: ${{ env.build-ARM == 'true' }} | |
#export PATH="/usr/local/lib/ccache:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
run: | | |
find . \( -name "*.lkrn" -or -name "*.efi" -or -name "*.iso" \) \( ! -name "Makefile*" \) -print | |
cd src && ./util/genfsimg -o ipxe-all-arch.iso -s menu.ipxe \ | |
bin-i386-efi/ipxe.efi \ | |
bin-x86_64-efi/ipxe.efi \ | |
bin-arm32-efi/ipxe.efi \ | |
bin-arm64-efi/ipxe.efi \ | |
bin/ipxe.lkrn || \ | |
./util/genfsimg -o ipxe-any.iso bin-*-efi/ipxe.efi bin/ipxe.lkrn | |
- name: list ISO | |
run: | | |
find . \( -name "*.lkrn" -or -name "*.efi" -or -name "*.iso" \) \( ! -name "Makefile*" \) -print | |
isoinfo -d -i src/*.iso | |
isoinfo -l -i src/*.iso | |
find . \( -name "*.lkrn" -or -name "*.lkr" -or -name "*.efi" -or -name "*.iso" \) \( ! -name "Makefile*" \) -exec 7z l '{}' ';' | |
- name: Build (Everything) | |
if: ${{ env.build-Everything == 'true' }} | |
#export PATH="/usr/local/lib/ccache:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
run: | | |
make -j$((`nproc`+0)) -C src everything | |
- name: Run sccache stat for check | |
if: ${{ env.build-with-SCCACHE == 'true' }} | |
shell: bash | |
run: ${SCCACHE_PATH} --show-stats | |
- name: Run ccache stat for check | |
if: ${{ env.build-with-CCACHE == 'true' }} | |
shell: bash | |
run: ${CCACHE_BIN} --show-config --show-stats --verbose --verbose | |
- name: Build ISO (Everything) | |
if: ${{ env.build-Everything == 'true' }} | |
#export PATH="/usr/local/lib/ccache:/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
run: | | |
find . \( -name ipxe.lkrn -or -name ipxe.efi \) -print | |
cd src && ./util/genfsimg -o ipxe-all-arch.iso -s menu.ipxe \ | |
bin-i386-efi/ipxe.efi \ | |
bin-x86_64-efi/ipxe.efi \ | |
bin-arm32-efi/ipxe.efi \ | |
bin-arm64-efi/ipxe.efi \ | |
bin/ipxe.lkrn || \ | |
./util/genfsimg -o ipxe-glob.iso bin-*-efi/ipxe.efi bin/ipxe.lkrn | |
- name: list ISO (Everything) | |
if: ${{ env.build-Everything == 'true' }} | |
continue-on-error: true | |
run: | | |
set -vx | |
find . \( -name "*.lkrn" -or -name "*.lkr" -or -name "*.efi" -or -name "*.iso" \) \( ! -name "Makefile*" \) -print | |
isoinfo -d -i src/*.iso | |
isoinfo -l -i src/*.iso | |
find . \( -name "*.lkrn" -or -name "*.lkr" -or -name "*.efi" -or -name "*.iso" \) \( ! -name "Makefile*" \) -exec 7z l '{}' ';' | |
- name: Test | |
if: ${{ env.build-Everything == 'true' }} | |
#continue-on-error: true | |
run: | | |
valgrind ./src/bin-i386-linux/tests.linux | |
valgrind ./src/bin-x86_64-linux/tests.linux | |
### | |
# - name: ssh | |
## if: ${{ env.ryanchapman-gha-ssh == 'true' }} | |
# continue-on-error: false | |
# if: ${{ failure() }} | |
# #if: ${{ true() }} | |
# #continue-on-error: true | |
# uses: ryanchapman/gha-ssh@v1 | |
# # after the container starts tmate in the background, it will | |
# # sleep for 24 hours, so it's important that you set a timeout here | |
# # so you doif: ${{ failure() }}n't run up your GitHub Actions bill | |
# timeout-minutes: 10 | |
# with: | |
# # authorized_github_users: required | |
# # List of GitHub users who are allowed to ssh into container. | |
# # On gha-ssh container start, it downloads the ssh public key(s) for each | |
# # user from GitHub and places it in ~/authorized_keys | |
# # tmate is started with `-a ~/authorized_keys` to only allow access | |
# # to users with possession of the corresponding private ssh keys. | |
# #authorized_github_users: 'johndoe,janedoe' | |
# authorized_github_users: 'woa7' | |
# # debug: optional | |
# # defaults to `false` if not set here | |
# # if debug is set, then tmate is started with `-vvv -F` | |
# debug: true | |
- name: foo run | |
run: | | |
echo foo | |
### | |