prepare v0.2 #7
Workflow file for this run
This file contains hidden or 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: C/C++ CI | |
on: | |
push: | |
branches: [master] | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
types: [opened, reopened, synchronize] | |
release: | |
types: [published] | |
workflow_dispatch: | |
env: | |
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true | |
jobs: | |
windows: | |
name: 'Windows' | |
runs-on: windows-2019 | |
env: | |
solution: 'httpd.sln' | |
buildPlatform: 'x86' | |
buildRelease: 'Release' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup MSBuild | |
uses: microsoft/setup-msbuild@v1.1.3 | |
- name: Build | |
run: | | |
msbuild ${{ env.solution }} -p:Configuration="${{ env.buildRelease }}" /t:Clean,Build /p:Platform=${{ env.buildPlatform }} /p:PlatformToolset=v140_xp /p:XPDeprecationWarning=false | |
- name: Move files | |
run: | | |
mkdir publish\bin\win32 | |
move ${{ env.buildRelease }}\httpd.dll publish\bin\win32\httpd.dll | |
- name: Deploy artifacts | |
uses: actions/upload-artifact@v3.1.1 | |
with: | |
name: win32 | |
path: publish/* | |
linux: | |
name: 'Linux' | |
runs-on: ubuntu-latest | |
container: s1lentq/linux86buildtools:latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install dependencies | |
run: | | |
apt-get install -y g++-8 g++-8-multilib | |
- name: Build | |
run: | | |
rm -rf build && CC=gcc-8 CXX=g++-8 cmake -B build -DUSE_STATIC_LIBSTDC=ON && cmake --build build -j8 | |
- name: Move files | |
run: | | |
mkdir -p publish/bin/linux32 | |
mv build/httpd.so publish/bin/linux32/httpd.so | |
- name: Deploy artifacts | |
uses: actions/upload-artifact@v3.1.1 | |
id: upload-job | |
with: | |
name: linux32 | |
path: publish/* | |
publish: | |
name: 'Publish' | |
runs-on: ubuntu-latest | |
needs: [windows, linux] | |
steps: | |
- name: Deploying linux artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: linux32 | |
- name: Deploying windows artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: win32 | |
- name: Publish artifacts | |
uses: softprops/action-gh-release@v0.1.15 | |
id: publish-job | |
if: | | |
github.event_name == 'release' && | |
github.event.action == 'published' && | |
startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
bin/linux32/httpd.so | |
bin/win32/httpd.dll |