Skip to content

Build & test

Build & test #4921

Workflow file for this run

name: "Build & test"
on:
push:
pull_request:
schedule:
- cron: '0 3 * * *'
jobs:
build_desktop:
name: "Build suite desktop"
runs-on: ubuntu-20.04
strategy:
matrix:
environment: [Debug, Release]
image: [ghcr.io/paradise-fi/rofi.debian, ghcr.io/paradise-fi/rofi.ubuntu]
defaults:
run:
shell: bash
container:
image: ${{ matrix.image }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: |
source setup.sh ${{ matrix.environment }}
rcfg desktop
rmake desktop
- name: Run tests
run: |
source setup.sh ${{ matrix.environment }}
rmake --test --all
build_esp32:
name: "Build suite esp32"
runs-on: ubuntu-20.04
strategy:
matrix:
environment: [Debug, Release]
container:
image: ghcr.io/paradise-fi/rofi.debian
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: |
source setup.sh -i ${{ matrix.environment }}
# Provide secrets
export ROFI_SSID="N/A"
export ROFI_WIFI_PASS=""
export ROFI_WLAN_USER=""
export RoFI_WLAN_PASS=""
# Configure and build
rcfg esp32
rmake esp32
build_stm32:
name: "Build suite stm32"
runs-on: ubuntu-20.04
strategy:
matrix:
environment: [Debug, Release]
container:
image: ghcr.io/paradise-fi/rofi.debian
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: |
source setup.sh ${{ matrix.environment }}
# Configure and build
rcfg stm32
rmake stm32
build_doc:
name: "Build documentation"
runs-on: ubuntu-20.04
container:
image: ghcr.io/paradise-fi/rofi.doc
defaults:
run:
shell: bash
steps:
# Work-around for https://github.com/actions/runner-images/issues/6775
- name: Change Owner of Container Working Directory
run: chown root:root .
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: |
source setup.sh Debug
rcfg doc
rmake doc
- name: Build other branches
if: github.ref == 'refs/heads/master'
run: |
echo ::group::Setting up repository for building all branches
source setup.sh Debug
# Fetch all branches
git fetch --all
git branch -r | grep -v '\->' | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | \
while read remote
do git branch --track "${remote#origin/}" "$remote" || true
done
git pull --all
echo ::endgroup::
releng/doc/buildAllBranches.sh
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: documentation
path: build.Debug/doc/web
retention-days: 14
deploy:
name: "Deploy documentation"
runs-on: ubuntu-20.04
needs: build_doc
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout # Required for GH-pages deployment
uses: actions/checkout@v3
- name: "Download web"
uses: actions/download-artifact@v3
with:
name: documentation
path: documentation
- run: ls documentation
- name: Deploy to GH Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: documentation
single-commit: true