Use main branch on dependencies. #4
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: Linux | |
# Dependencies of this package | |
env: | |
UBUNTU_APT: ${{ 'libglib2.0-dev glib-networking gobject-introspection libgirepository1.0-dev libxml2-dev jq' }} | |
on: | |
push: | |
branches: | |
- development | |
- main | |
pull_request: | |
branches: | |
- development | |
- main | |
jobs: | |
build-linux: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, ubuntu-22.04, ubuntu-20.04] | |
swift: ["5.9", "5.7"] | |
name: Swift ${{ matrix.swift }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: swift-actions/setup-swift@v1 | |
with: | |
swift-version: ${{ matrix.swift }} | |
- name: Print Linux and Swift version | |
run: | | |
lsb_release -d | |
swift --version | |
- name: Fetch Linux dependencies | |
if: ${{ runner.os == 'Linux' }} | |
run: sudo apt-get install $UBUNTU_APT | |
- name: Checkout SwiftGModule | |
uses: actions/checkout@v4 | |
with: | |
path: SwiftGModule | |
- name: Build SwiftGModule | |
run: | | |
cd SwiftGModule | |
swift build | |
cd .. | |
- name: Test SwiftGModule | |
run: | | |
cd SwiftGModule | |
swift test | |
cd .. | |
- name: Remove unneeded files and archive artefacts | |
run: | | |
rm -rf _tempGTK | |
cd SwiftGModule | |
swift package clean | |
rm -rf .build/repositories | |
cd .. |