Skip to content

Nightly Build

Nightly Build #167

Workflow file for this run

name: Nightly Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
# Run every day at 12:00 AM (nightly builds)
- cron: '0 12 * * *'
workflow_dispatch:
permissions:
contents: read
jobs:
build-native:
strategy:
fail-fast: false
matrix:
include:
# Build native on both ubuntu 22.04
- os: ubuntu-22.04
runs-on: ${{ matrix.os }}
steps:
# Checkout code
- uses: actions/checkout@v3
# Perform Phoenix Pro installation process
- name: Add Phoenix Pro to local apt
run: |
sudo curl -s --compressed -o /usr/share/keyrings/ctr-pubkey.gpg "https://deb.ctr-electronics.com/ctr-pubkey.gpg"
sudo curl -s --compressed -o /etc/apt/sources.list.d/ctr2024.list "https://deb.ctr-electronics.com/ctr2024.list"
# Update apt and install phoenix6
- name: Install Phoenix 6
run: |
sudo apt-get update
sudo apt-get install phoenix6 cmake build-essential libsdl2-dev -y
# Build using CMake
- name: Build Example
run: |
mkdir build
cd build
cmake ..
make
- name: Run Example
run: |
cd build
timeout 10s ./Phoenix6-Example || ( [[ $? -eq 124 ]] && echo "Program started successfully" )
build-arm:
strategy:
fail-fast: false
matrix:
include:
# 32-bit arm on bullseye
- arch: armv7
distro: bullseye
# 64-bit arm on bullseye
- arch: aarch64
distro: bullseye
# 32-bit arm on bookworm
- arch: none
distro: none
base_image: arm32v7/debian:bookworm
# 64-bit arm on bookworm
- arch: none
distro: none
base_image: arm64v8/debian:bookworm
# 32-bit arm on ubuntu 20.04 (Seems to have problems compiling despite it working fine on real hardware)
#- arch: armv7
# distro: ubuntu20.04
# 64-bit arm on ubuntu 20.04
- arch: aarch64
distro: ubuntu20.04
# 32-bit arm on ubuntu 22.04
- arch: armv7
distro: ubuntu22.04
# 64-bit arm on ubuntu 22.04
- arch: aarch64
distro: ubuntu22.04
runs-on: ubuntu-latest
steps:
# Checkout code
- uses: actions/checkout@v3
# Do all the same steps as the above code, but all at once under the architecture
- uses: uraimo/run-on-arch-action@v2
name: Build on arch
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
base_image: ${{ matrix.base_image }}
# Not required, but speeds up builds by storing container images in
# a GitHub package registry.
githubToken: ${{ github.token }}
# Perform the installation in a cached state to speed up subsequent builds
install: |
apt-get update
apt-get install curl -y
curl -s --compressed -o /usr/share/keyrings/ctr-pubkey.gpg "https://deb.ctr-electronics.com/ctr-pubkey.gpg"
curl -s --compressed -o /etc/apt/sources.list.d/ctr2024.list "https://deb.ctr-electronics.com/ctr2024.list"
apt-get update
apt-get install phoenix6 cmake build-essential libsdl2-dev -y
# Perform the necesary steps to build the example
run: |
mkdir build
cd build
cmake ..
make
timeout 10s ./Phoenix6-Example || ( [[ $? -eq 124 ]] && echo "Program started successfully" )