Build and Test on 862c30ed393331dd2a3b88eaccf3828c2df245dd #294
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: Build and Test | |
run-name: Build and Test on ${{ github.sha }} | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
Build-and-Test-on-Linux: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
distro: | |
- ubuntu | |
- fedora | |
- arch | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref || github.ref_name }} | |
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} | |
- name: Build | |
run: docker build -t clipshare -f "docker/Dockerfile.${{matrix.distro}}" . | |
- name: Test | |
run: docker run clipshare | |
Build-and-Test-on-Windows: | |
runs-on: windows-latest | |
timeout-minutes: 10 | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- name: Setup MSYS2 | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: MINGW64 | |
update: false | |
install: >- | |
mingw-w64-x86_64-gcc | |
mingw-w64-x86_64-make | |
mingw-w64-x86_64-openssl | |
mingw-w64-x86_64-libpng | |
mingw-w64-x86_64-libunistring | |
mingw-w64-x86_64-python | |
findutils | |
diffutils | |
openbsd-netcat | |
sed | |
- name: Setup make | |
run: ln -s /mingw64/bin/mingw32-make.exe /mingw64/bin/make.exe | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref || github.ref_name }} | |
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} | |
- name: Build | |
run: | | |
make | |
make web | |
- name: Test | |
run: make test | |
Build-and-Test-on-macOS: | |
strategy: | |
matrix: | |
os: | |
- macos-latest | |
- macos-13 | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 10 | |
steps: | |
- name: Install build dependencies | |
run: brew install openssl@3 libpng libunistring | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref || github.ref_name }} | |
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} | |
- name: Build | |
run: make | |
- name: Install test dependencies | |
run: | | |
brew install coreutils gnu-sed | |
echo "$(brew --prefix coreutils)"'/libexec/gnubin' >> $GITHUB_PATH | |
echo "$(brew --prefix gnu-sed)"'/libexec/gnubin' >> $GITHUB_PATH | |
- name: Test | |
run: | | |
export TERM=xterm-256color | |
make test |