3proxy/.github/workflows/c-cpp.yml
Vladimir Dubrovin e26e3727a3
Update c-cpp.yml
2025-03-14 21:48:02 +03:00

63 lines
2.1 KiB
YAML

name: C/C++ CI
on:
push:
branches: [ "workflow-test" ]
paths: [ '**.c', '**.h', 'Makefile.**', '.github/configs', '.github/workflows/c-cpp.yml' ]
pull_request:
branches: [ "workflow-test" ]
paths: [ '**.c', '**.h', 'Makefile.**', '.github/configs', '.github/workflows/c-cpp.yml' ]
jobs:
ci:
name: "${{ matrix.target }}"
strategy:
matrix:
target:
- ubuntu-latest
- ubuntu-24.04-arm
- macos-15
- windows-2022
runs-on: ${{ matrix.target }}
steps:
- uses: actions/checkout@v4
# - name: configure
# run: ./configure
- name: ln Linux
if: ${{ startsWith(matrix.target, 'ubuntu') }}
run: ln -s Makefile.Linux Makefile
- name: ln Mac
if: ${{ startsWith(matrix.target, 'macos') }}
run: ln -s Makefile.FreeBSD Makefile
- name: dirs Windows 0
if: ${{ startsWith(matrix.target, 'windows') }}
run: cmd /C 'echo:>>Makefile.win'
- name: dirs Windows 1
if: ${{ startsWith(matrix.target, 'windows') }}
run: cmd /C 'echo LIBS := -L "c:/program files/openssl/lib" $(LIBS) >>Makefile.win'
- name: dirs Windows 2
if: ${{ startsWith(matrix.target, 'windows') }}
run: cmd /C 'echo CFLAGS := -I "c:/program files/openssl/include" $(CFLAGS) >>Makefile.win'
- name: dirs Windows 3
if: ${{ startsWith(matrix.target, 'windows') }}
run: cmd /C 'type Makefile.win'
- name: ln Windows
if: ${{ startsWith(matrix.target, 'windows') }}
run: copy Makefile.win Makefile
- name: SSLPlugin Linux
if: ${{ startsWith(matrix.target, 'ubuntu') }}
run: 'echo PLUGINS := $(PLUGINS) SSLPlugin >>Makefile & echo LIBS := $(LIBS) -lcrypto -lssl >>Makefile'
- name: make
run: make
- name: ln Windows
if: ${{ startsWith(matrix.target, 'windows') }}
run: make allplugins
- name: mkdir
if: ${{ startsWith(matrix.target, 'ubuntu') }}
run: mkdir ~/3proxy
- name: make install
if: ${{ startsWith(matrix.target, 'ubuntu') }}
run: make DESTDIR=~/3proxy install
- name: make clean
run: make clean