Skip to content

ubuntu-legacy

ubuntu-legacy #788

Workflow file for this run

name: ubuntu-legacy
# Workflow for running builds on legacy/EOL Ubuntu versions (as required)
on:
pull_request:
types: [ opened, synchronize, reopened, closed ]
paths-ignore:
- .github/workflows/macos.yaml
- .github/workflows/windows.yaml
- .github/workflows/fedora.yml
- .github/workflows/ubuntu.yml
- '**/*.md'
release:
types: [ published, created, edited ]
workflow_dispatch:
schedule:
# daily
- cron: '0 0 * * *'
jobs:
build-matrix:
if: "!contains(github.event.pull_request.labels.*.name, 'ci: skip ubuntu-legacy')"
runs-on: ubuntu-latest
outputs:
llvm-versions: ${{ steps.assemble-matrix.outputs.llvm-versions }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Assemble build matrix
id: assemble-matrix
uses: ./.github/actions/build-matrix
with:
# Default LLVM versions to test for this workflow
default-llvm-versions: '[14, 18, 22]'
run:
needs: build-matrix
strategy:
fail-fast: false
matrix:
os: [ubuntu:20.04]
llvm: ${{ fromJSON(needs.build-matrix.outputs.llvm-versions) }}
runs-on: ubuntu-latest
container:
image: ${{ matrix.os }}
env:
# Set DEBIAN_FRONTEND to noninteractive to avoid prompts during package installation
DEBIAN_FRONTEND: noninteractive
NONINTERACTIVE: 'true'
steps:
- name: Check Environment
run: |
echo "Running on Ubuntu version: $(lsb_release -d | cut -f2)"
echo "Running on architecture: $(uname -m)"
echo "Current directory: $(pwd)"
echo "Environment variables:"
env
# OS-specific tool installation
- name: Set up tools
shell: bash
run: |
apt-get update -yq
apt-get install -yq \
bash sudo git apt-utils \
python3 python3-pip python3.8-venv \
libssl-dev libcurl4-openssl-dev
# Set non-interactive shell
echo "debconf debconf/frontend select Noninteractive" | debconf-set-selections
# Create non-root user
groupadd -g 1000 user
useradd -m -d /home/user -u 1000 -g user -s /bin/bash user
echo "user ALL=(ALL) NOPASSWD: ALL" | tee /etc/sudoers.d/user
- uses: actions/checkout@v4
- name: Setup workspace
uses: ./.github/actions/setup-workspace
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
cache: true
cache-key: ${{ matrix.os }}-llvm${{ matrix.llvm }}
user: user
- name: Test workspace
shell: bash
run: |
sudo -E -u user bash -c " \
cd $GITHUB_WORKSPACE && \
pwd && ls -la && \
source ./setup_env.sh && \
dart --version \
"
- name: Test AOT creation
shell: bash
run: |
env
cd $GITHUB_WORKSPACE
pwd; ls -la
sudo -E -u user bash -c " \
source ./setup_env.sh && \
./flutter_workspace.py --create-aot --app-path=./app/tcna-packages/packages/flatpak/example/ \
"