Add initial unit tests. #28
Workflow file for this run
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: compile-linux | |
on: | |
push: | |
branches: | |
- "**" | |
- "!dependabot/**" | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
job: | |
name: ${{ matrix.os }}-${{ github.workflow }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04, ubuntu-latest] | |
arch: [x86_64] | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Install libraries | |
run: | | |
sudo apt-get -y install libjpeg-dev | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.11" | |
- name: Build | |
run: | | |
./configure | |
make -j | |
make printable.man | |
- name: Tests | |
run: | | |
make test | |
# Gather documentation and executables to a common directory | |
- name: Prepare files | |
if: matrix.os != 'ubuntu-latest' | |
run: | | |
mkdir -p build/dist | |
cp jpeginfo jpeginfo.txt COPYRIGHT LICENSE README build/dist/ | |
shell: bash | |
# Upload the compiled binary | |
- name: Upload binary | |
uses: actions/upload-artifact@v3 | |
if: matrix.os != 'ubuntu-latest' | |
with: | |
name: jpegoptim-${{ matrix.os }}-${{ matrix.arch }} | |
path: build/dist | |