CI #34
This file contains 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: 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 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-13 | |
steps: | |
- name: Check Environment | |
run: | | |
[ "$(uname -m)" = "x86_64" ] || exit 1 | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
eval "$(brew shellenv)" | |
brew unlink perl | |
cd '${{ github.workspace }}' && ./dist/osx/install_deps.sh | |
- name: Compile and bundle application | |
run: | | |
eval "$(brew shellenv)" | |
cd '${{ github.workspace }}' && ./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.tgz | |
Build-macOS-AppleSilicon: | |
name: Build Spek-X (macOS, Apple Silicon) | |
runs-on: macos-13 | |
steps: | |
- name: Check Environment | |
run: | | |
[ "$(uname -m)" = "arm64" ] || exit 1 | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
eval "$(brew shellenv)" | |
brew unlink perl | |
cd '${{ github.workspace }}' && ./dist/osx/cross/install_deps.sh i_am_ci | |
- name: Compile and bundle application | |
run: | | |
eval "$(brew shellenv)" | |
cd '${{ github.workspace }}' && ./dist/osx/cross/bundle.sh i_am_ci | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Spek-X (macOS, Apple Silicon) | |
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 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 |