rename tools to apps (#267) #199
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 | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build_linux: | |
runs-on: ubuntu-22.04 | |
env: | |
BUILD_TYPE: release | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Prepare docker image | |
run: ci/prepare.sh | |
- name: Install tools | |
run: ci/install.sh | |
- name: Build server | |
run: ci/build-server.sh | |
- name: Build rest | |
run: ci/build-rest.sh | |
- name: Test | |
run: ci/test.sh | |
- name: Upload binaries | |
uses: actions/upload-artifact@v3 | |
with: | |
name: beefweb_linux | |
if-no-files-found: error | |
path: build/${{ env.BUILD_TYPE }}/*.tar.gz | |
build_windows: | |
runs-on: windows-2022 | |
defaults: | |
run: | |
shell: cmd | |
strategy: | |
matrix: | |
arch: | |
- Win32 | |
- x64 | |
env: | |
BUILD_TYPE: Release | |
BUILD_ARCH: ${{ matrix.arch }} | |
steps: | |
- name: Set git to use LF | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.eol lf | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup MSVC | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
vsversion: '2022' | |
arch: ${{ matrix.arch }} | |
- name: Install tools | |
run: cmd /c ci\install.cmd | |
- name: Build | |
run: cmd /c ci\build.cmd | |
- name: Test | |
run: cmd /c ci\test.cmd | |
- name: Upload binaries | |
uses: actions/upload-artifact@v3 | |
with: | |
name: beefweb_windows | |
if-no-files-found: error | |
path: | | |
build\${{ env.BUILD_TYPE }}\*.fb2k-component | |
build\${{ env.BUILD_TYPE }}\*.zip | |
merge_packages: | |
runs-on: ubuntu-22.04 | |
needs: build_windows | |
steps: | |
- name: Download original packages | |
uses: actions/download-artifact@v3 | |
with: | |
name: beefweb_windows | |
path: input | |
- name: Merge packages | |
run: | | |
pkg_ext=fb2k-component | |
pkg_32=$(pwd)/input/*-x86.$pkg_ext | |
pkg_64=$(pwd)/input/*-x64.$pkg_ext | |
pkg_unified=$(pwd)/output/$(basename $pkg_32 -x86.$pkg_ext).$pkg_ext | |
mkdir -p work/x64 output | |
(cd work/x64 && unzip $pkg_64 '*.dll') | |
cp $pkg_32 $pkg_unified | |
(cd work && zip -r -9 $pkg_unified *) | |
- name: Upload merged package | |
uses: actions/upload-artifact@v3 | |
with: | |
name: beefweb_windows_unified | |
if-no-files-found: error | |
path: output/*.fb2k-component |