Skip to content

CI

CI #42

Workflow file for this run

name: CI
run-name: CI
on: [push, pull_request, workflow_dispatch]
env:
HOMEBREW_NO_ANALYTICS: 1
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
jobs:
Build-Debian-x86_64:
name: Build Spek-X (Debian, x86_64)
runs-on: ubuntu-latest
container: debian:sid
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install dependencies
run: |
apt update
apt full-upgrade -y
apt install -y g++ make pkg-config libtool intltool libwxgtk3.2-dev wx-common libavcodec-dev libavformat-dev
- name: Compile and bundle application
run: |
mkdir -p ./dist/debian/spek-x/usr ./dist/debian/spek-x/DEBIAN
./autogen.sh --prefix="$(realpath ./dist/debian/spek-x/usr)"
make -j2 && make install
cp ./dist/debian/control.ci ./dist/debian/spek-x/DEBIAN/control
dpkg-deb --build dist/debian/spek-x
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: Spek-X (Debian, x86_64)
path: ${{ github.workspace }}/dist/debian/spek-x.deb
Build-Windows-x64:
name: Build Spek-X (Windows, x64)
runs-on: windows-latest
defaults:
run:
shell: cmd
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Get dependencies from cache
uses: actions/cache/restore@v4
with:
key: spek-x-msys2-mingw64
path: C:\msys2
- name: Check whether MSYS2 is working
run: |
"C:\msys2\msys64\usr\bin\env.exe" MSYSTEM=MINGW64 /usr/bin/bash -lc "echo OK"
- name: Compile and bundle application
run: |
"C:\msys2\msys64\usr\bin\env.exe" MSYSTEM=MINGW64 /usr/bin/bash -lc "cd '${{ github.workspace }}' && ./dist/win/bundle.sh"
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: Spek-X (Windows, x64)
path: ${{ github.workspace }}/dist/win/Spek/Spek.zip
Build-macOS-Intel:
name: Build Spek-X (macOS, Intel)
runs-on: macos-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install dependencies
run: |
eval "$(brew shellenv)"
brew unlink perl
cd '${{ github.workspace }}' && ARCH=x86_64 ./dist/osx/install_deps.sh
- name: Compile and bundle application
run: |
eval "$(brew shellenv)"
cd '${{ github.workspace }}' && ARCH=x86_64 ./dist/osx/bundle.sh
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: Spek-X (macOS, Intel)
path: ${{ github.workspace }}/dist/osx/Spek.x86_64.tgz
Build-macOS-AppleSilicon:
name: Build Spek-X (macOS, Apple Silicon)
runs-on: macos-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install dependencies
run: |
eval "$(brew shellenv)"
brew unlink perl
cd '${{ github.workspace }}' && ARCH=arm64 ./dist/osx/install_deps.sh
- name: Compile and bundle application
run: |
eval "$(brew shellenv)"
cd '${{ github.workspace }}' && ARCH=arm64 ./dist/osx/bundle.sh
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: Spek-X (macOS, Apple Silicon)
path: ${{ github.workspace }}/dist/osx/Spek.arm64.tgz
Build-macOS-Universal:
name: Build Spek-X (macOS, Universal)
runs-on: macos-latest
needs:
- Build-macOS-Intel
- Build-macOS-AppleSilicon
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Download Spek-X (macOS, Intel)
uses: actions/download-artifact@v4
with:
name: Spek-X (macOS, Intel)
path: ${{ github.workspace }}/dist/osx/
- name: Download Spek-X (macOS, Apple Silicon)
uses: actions/download-artifact@v4
with:
name: Spek-X (macOS, Apple Silicon)
path: ${{ github.workspace }}/dist/osx/
- name: Bundle application
run: |
eval "$(brew shellenv)"
cd '${{ github.workspace }}' && ./dist/osx/bundle_universal.sh merge_only
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: Spek-X (macOS, Universal)
path: ${{ github.workspace }}/dist/osx/Spek.tgz
Unit-Test:
name: Unit Tests
runs-on: ubuntu-latest
container: debian:sid
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install dependencies
run: |
apt update
apt full-upgrade -y
apt install -y g++ make pkg-config libtool intltool libwxgtk3.2-dev wx-common libavcodec-dev libavformat-dev
- name: Run tests
run: |
./autogen.sh && make check