Skip to content

Commit

Permalink
ci: Disable Flatpak and Windows builds, temporarily remove macOS ARM …
Browse files Browse the repository at this point in the history
…build
  • Loading branch information
silviot committed Dec 7, 2024
1 parent 21802ee commit a2331f4
Showing 1 changed file with 1 addition and 126 deletions.
127 changes: 1 addition & 126 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,6 @@ name: CI
# are not yet available for this platform in vcpkg

jobs:
flatpak:
name: "Flatpak"
runs-on: ubuntu-24.04
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-47
options: --privileged
strategy:
matrix:
arch: [x86_64, aarch64]
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install deps
if: ${{ matrix.arch != 'x86_64' }}
run: |
dnf -y install docker
- name: Set up QEMU
if: ${{ matrix.arch != 'x86_64' }}
id: qemu
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: aardvark.flatpak
manifest-path: org.p2panda.aardvark.json
cache-key: flatpak-builder-${{ hashFiles('org.p2panda.aardvark.json') }}-${{ matrix.arch }}
arch: ${{ matrix.arch }}

macos:
name: "macOS"
runs-on: macos-latest
Expand All @@ -47,8 +16,7 @@ jobs:
include:
- target: x86_64-apple-darwin
arch: x86_64
- target: aarch64-apple-darwin
arch: arm64
# Temporarily disabled the arm build
steps:
- uses: actions/checkout@v4
- uses: moonrepo/setup-rust@v1
Expand Down Expand Up @@ -163,96 +131,3 @@ jobs:
with:
name: aardvark-macos-${{ matrix.arch }}
path: aardvark-${{ matrix.arch }}.dmg

windows:
name: "Windows"
runs-on: windows-latest
# Only build for x64 since GTK4 is not available for Windows ARM64 yet
strategy:
fail-fast: false
matrix:
arch: [x64]
steps:
- uses: actions/checkout@v4
- uses: moonrepo/setup-rust@v1
- name: Install target
if: matrix.arch == 'arm64'
run: rustup target add aarch64-pc-windows-msvc
- name: Setup Windows build variables
run: |
$arch = "${{ matrix.arch }}"
$triplet = if ($arch -eq "x64") { "x64-windows" } else { "arm64-windows" }
echo "VCPKG_TRIPLET=$triplet" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "VCPKG_ROOT=C:\vcpkg" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
shell: pwsh

# Cache vcpkg packages
- name: Cache vcpkg
uses: actions/cache@v3
with:
path: |
C:\vcpkg\installed
C:\vcpkg\packages
key: vcpkg-${{ matrix.arch }}-${{ hashFiles('**/vcpkg.json', '.github/workflows/install_vcpkg.ps1') }}
restore-keys: |
vcpkg-${{ matrix.arch }}-
- name: Install GTK4 and dependencies
run: . .\.github\workflows\install_vcpkg.ps1
shell: pwsh

- name: Configure pkg-config paths
run: |
$installPrefix = "$env:VCPKG_ROOT\installed\$env:VCPKG_TRIPLET"
# Add required paths to system PATH
$env:Path = "$installPrefix\bin;$env:Path"
$env:Path = "$env:VCPKG_ROOT\downloads\tools\pkgconfig\windows\pkg-config-0.29.2-3\tools\pkg-config-0.29.2\bin;$env:Path"
# Set pkg-config environment variables
$env:PKG_CONFIG = "$env:VCPKG_ROOT\downloads\tools\pkgconfig\windows\pkg-config-0.29.2-3\tools\pkg-config-0.29.2\bin\pkg-config.exe"
$env:PKG_CONFIG_PATH = "$installPrefix\lib\pkgconfig"
$env:PKG_CONFIG_LIBDIR = "$installPrefix\lib\pkgconfig"
$env:PKG_CONFIG_ALLOW_CROSS = "1"
$env:PKG_CONFIG_ALLOW_SYSTEM_CFLAGS = "1"
$env:PKG_CONFIG_ALLOW_SYSTEM_LIBS = "1"
# Export variables to GITHUB_ENV
"PKG_CONFIG=$env:PKG_CONFIG" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
"PKG_CONFIG_PATH=$env:PKG_CONFIG_PATH" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
"PKG_CONFIG_LIBDIR=$env:PKG_CONFIG_LIBDIR" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
"PKG_CONFIG_ALLOW_CROSS=1" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
"PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
"PKG_CONFIG_ALLOW_SYSTEM_LIBS=1" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
# Add to PATH for subsequent steps
"$installPrefix\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
"$env:VCPKG_ROOT\downloads\tools\pkgconfig\windows\pkg-config-0.29.2-3\tools\pkg-config-0.29.2\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
shell: pwsh

- name: Verify pkg-config setup
run: |
Write-Host "Verifying pkg-config installation..."
pkg-config --version
Write-Host "Checking library configurations..."
pkg-config --debug --print-errors --cflags --libs glib-2.0
pkg-config --debug --print-errors --cflags --libs gtk4 libadwaita-1
shell: pwsh
- name: Build
run: |
$arch = "${{ matrix.arch }}"
$target = if ($arch -eq "x64") { "x86_64-pc-windows-msvc" } else { "aarch64-pc-windows-msvc" }
cargo build --release --target $target
shell: pwsh
- name: Package
run: |
mkdir aardvark-${{ matrix.arch }}
copy target/${{ matrix.arch == 'x64' && 'x86_64-pc-windows-msvc' || 'aarch64-pc-windows-msvc' }}/release/aardvark.exe aardvark-${{ matrix.arch }}/
# Add any additional DLLs or resources here
- name: Create ZIP
run: Compress-Archive -Path aardvark-${{ matrix.arch }} -DestinationPath aardvark-windows-${{ matrix.arch }}.zip
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: aardvark-windows-${{ matrix.arch }}
path: aardvark-windows-${{ matrix.arch }}.zip

0 comments on commit a2331f4

Please sign in to comment.