Merge pull request #117 from ToxicStoxm/CI-CD-Fixes #2
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: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
setup: | |
name: Environment Setup | |
runs-on: ubuntu-24.04 | |
steps: | |
# Step 1: Checkout the code | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Ensure we get the full history if needed | |
# Step 2: Add custom repository for dependencies | |
- name: Add Custom Repository | |
run: | | |
sudo add-apt-repository 'deb https://ftp.uni-stuttgart.de/ubuntu/ oracular main' | |
sudo apt-get update | |
# Step 3: Install required dependencies | |
- name: Install System Dependencies | |
run: | | |
sudo apt-get install -y \ | |
libadwaita-1-dev=1.6.0-1ubuntu2 \ | |
gettext \ | |
desktop-file-utils | |
setup-tools: | |
name: Setup Build Tools | |
runs-on: ubuntu-24.04 | |
needs: setup # Depends on the 'setup' job | |
steps: | |
# Step 1: Checkout code again if required | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
# Step 2: Set up Java Development Kit | |
- name: Set up JDK 23 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '23' | |
distribution: 'temurin' | |
# Step 3: Set up Python | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
build: | |
name: Build and Install with Meson | |
runs-on: ubuntu-24.04 | |
needs: [setup, setup-tools] # Depends on the previous jobs | |
steps: | |
# Step 1: Checkout code again if needed | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
# Step 2: Run the Meson Build Action | |
- name: Install and Build with Meson | |
uses: BSFishy/[email protected] | |
with: | |
action: install | |
setup-options: --prefix /tmp/install | |
directory: build | |
meson-version: 1.6.0 | |
ninja-version: 1.11.1.2 |