fedora #879
This file contains hidden or 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: fedora | |
| on: | |
| pull_request: | |
| types: [ opened, synchronize, reopened, closed ] | |
| paths-ignore: | |
| - .github/workflows/macos.yaml | |
| - .github/workflows/ubuntu.yml | |
| - .github/workflows/windows.yaml | |
| - '**/*.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 fedora')" | |
| 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: | |
| # Exclude older LLVM versions that are not available on Fedora | |
| exclude-llvm-versions: '[14, 15, 16, 17]' | |
| run: | |
| needs: build-matrix | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [fedora:42, fedora:43, fedora:44] | |
| llvm: ${{ fromJSON(needs.build-matrix.outputs.llvm-versions) }} | |
| # NOTE: GitHub Actions does not support running on Fedora directly, so we run it in a container. | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ${{ matrix.os }} | |
| steps: | |
| - name: Check Environment | |
| run: | | |
| echo "Running on Fedora version: $(cat /etc/fedora-release)" | |
| echo "Running on architecture: $(uname -m)" | |
| echo "Current directory: $(pwd)" | |
| echo "Environment variables:" | |
| env | |
| - name: Set up tools | |
| shell: bash | |
| run: | | |
| dnf install -y \ | |
| python3 python3-pip which util-linux git sudo | |
| # Create non-root user | |
| groupadd -g 1000 user | |
| useradd -m -u 1000 -g user -G wheel -s /bin/bash user | |
| echo "user ALL=(ALL) NOPASSWD: ALL" | tee /etc/sudoers.d/user | |
| - uses: actions/checkout@v4 | |
| - name: Create 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 | |
| env: | |
| CI: true | |
| GITHUB_ACTIONS: true | |
| 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 | |
| env: | |
| CI: true | |
| GITHUB_ACTIONS: true | |
| run: | | |
| sudo -E -u user bash -c " \ | |
| cd $GITHUB_WORKSPACE && \ | |
| pwd && ls -la && \ | |
| source ./setup_env.sh && \ | |
| ./flutter_workspace.py --create-aot --app-path=./app/tcna-packages/packages/flatpak/example/ \ | |
| " |