EHS/.gitea/workflows/BuildRelease.yaml

155 lines
4.4 KiB
YAML
Raw Normal View History

2024-02-05 22:25:30 -08:00
name: Build & Release
run-name: ${{ gitea.actor }} is testing out Gitea Actions
on:
push:
tags:
- "v*"
jobs:
Windows-AMD64-Build:
runs-on: windows-x86_64
2024-10-01 20:19:38 -07:00
defaults:
run:
shell: powershell
2024-02-05 22:25:30 -08:00
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Generating Documentation
run: |
doxygen ehs-docs-config.doxyfile
- name: Building/Compiling/Installing Project
run: |
cd ${{ gitea.workspace }}
2024-09-29 21:06:30 -07:00
vcpkg install
2024-09-30 19:55:44 -07:00
mkdir build
2024-02-05 22:25:30 -08:00
cd build
2024-09-30 19:55:44 -07:00
cmake -A x64 -DCMAKE_BUILD_TYPE=Release ..
2024-02-05 22:25:30 -08:00
cmake --build . --config Release
2024-02-05 22:54:47 -08:00
cmake --install .
2024-02-05 22:25:30 -08:00
- name: Creating Appropriate Directories
run: |
cd ${{ gitea.workspace }}
mkdir bin
2024-10-01 19:50:21 -07:00
mv build/Release/EHS_Dyn.dll bin
2024-02-05 22:25:30 -08:00
mv build/Release/StrToHash.exe bin
mv build/Release/zlib1.dll bin
mkdir lib
2024-10-01 19:50:21 -07:00
mv build/Release/EHS_Stc.lib lib
mv build/Release/EHS_Dyn.lib lib
2024-02-05 22:25:30 -08:00
- name: Zipping Binaries
run: |
cd ${{ gitea.workspace }}
tar -a -c -f ehs-windows-amd64.zip include bin lib docs LICENSE README.md
- uses: https://github.com/actions/setup-go@v4
with:
go-version: '>=1.20.1'
- name: Use Go Action
id: use-go-action
uses: https://gitea.com/actions/release-action@main
with:
files: |-
ehs-windows-amd64.zip
2024-10-01 19:58:35 -07:00
api_key: '${{secrets.RELEASE_TOKEN}}'
2024-02-05 22:25:30 -08:00
Linux-AMD64-Build:
runs-on: linux-x86_64
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Installing Dependencies
run: |
2024-10-01 21:00:00 -07:00
sudo pacman -S --noconfirm doxygen zip alsa-lib libxcb xcb-util-cursor pipewire
2024-02-05 22:25:30 -08:00
- name: Generating Package
run: |
cd ${{ gitea.workspace }}
conan create .
conan remote add origin https://gitea.eventhorizonstudio.io/api/packages/EHS/conan
conan user --remote origin --password ${{secrets.CONAN_TOKEN}} ${{secrets.CONAN_USERNAME}}
conan upload --remote=origin ehs
2024-02-05 22:25:30 -08:00
- name: Generating Documentation
run: |
doxygen ehs-docs-config.doxyfile
- name: Building/Compiling/Installing Project
run: |
cd ${{ gitea.workspace }}
cmake -DCMAKE_BUILD_TYPE=Release -DLINUX_WINDOW_SYSTEM:STRING=XCB .
cmake --build . --config Release
cmake --install .
- name: Creating Appropriate Directories
run: |
2024-10-05 19:05:30 -07:00
cd ${{ gitea.workspace }}
2024-02-05 22:25:30 -08:00
mkdir bin
2024-10-05 19:05:30 -07:00
mv libEHS_Dyn.so bin
2024-02-05 22:25:30 -08:00
mv StrToHash bin
mkdir lib
2024-10-01 21:27:31 -07:00
mv libEHS_Stc.a lib
2024-02-05 22:25:30 -08:00
- name: Zipping Binaries
run: zip -r ehs-linux-amd64.zip include bin lib docs LICENSE RADME.md
- uses: https://github.com/actions/setup-go@v4
with:
go-version: '>=1.20.1'
- name: Use Go Action
id: use-go-action
uses: https://gitea.com/actions/release-action@main
with:
files: |-
ehs-linux-amd64.zip
api_key: '${{secrets.RELEASE_TOKEN}}'
Linux-AARCH64-Build:
runs-on: linux-aarch64
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Installing Dependencies
2024-10-01 21:27:31 -07:00
run: sudo apt install -y doxygen zip libasound2-dev libxcb1-dev libxcb-xinput-dev libxcb-cursor-dev libpipewire-0.3-dev
2024-02-05 22:25:30 -08:00
- name: Generating Documentation
run: |
doxygen ehs-docs-config.doxyfile
- name: Building/Compiling/Installing Project
run: |
cd ${{ gitea.workspace }}
cmake -DCMAKE_BUILD_TYPE=Release -DLINUX_WINDOW_SYSTEM:STRING=XCB .
cmake --build . --config Release
cmake --install .
- name: Creating Appropriate Directories
run: |
2024-10-05 19:05:30 -07:00
cd ${{ gitea.workspace }}
2024-02-05 22:25:30 -08:00
mkdir bin
2024-10-05 19:05:30 -07:00
mv libEHS_Dyn.so bin
2024-02-05 22:25:30 -08:00
mv StrToHash bin
mkdir lib
2024-10-01 21:27:31 -07:00
mv libEHS_Stc.a lib
2024-02-05 22:25:30 -08:00
- name: Zipping Binaries
run: zip -r ehs-linux-aarch64.zip include bin lib docs LICENSE README.md
- uses: https://github.com/actions/setup-go@v4
with:
go-version: '>=1.20.1'
- name: Use Go Action
id: use-go-action
uses: https://gitea.com/actions/release-action@main
with:
files: |-
ehs-linux-aarch64.zip
api_key: '${{secrets.RELEASE_TOKEN}}'