Update batteries #28
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: CI | |
# Trigger on pushes and pull requests to the main branch. | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
# Set permissions for the workflow. | |
permissions: | |
contents: write | |
pull-requests: write | |
checks: write | |
jobs: | |
Linux: | |
name: Linux Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y clang cmake jq libabsl-dev libgtest-dev libbenchmark-dev | |
- name: Build and Install Abseil from Source | |
run: | | |
git clone https://github.com/abseil/abseil-cpp.git | |
cd abseil-cpp | |
mkdir build && cd build | |
cmake -DCMAKE_INSTALL_PREFIX=/usr .. | |
make -j$(nproc) | |
sudo make install | |
- name: Install GitVersion Tool | |
run: | | |
dotnet tool install GitVersion.Tool --tool-path "$HOME/.dotnet/tools" | |
echo "$HOME/.dotnet/tools" >> $GITHUB_PATH | |
- name: Add .dotnet Tools to PATH | |
run: echo "${HOME}/.dotnet/tools" >> $GITHUB_PATH | |
- name: Run Build Script | |
run: ./build.sh | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifacts | |
path: bin/artifacts/ | |
macOS: | |
name: macOS Build | |
runs-on: macos-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Dependencies via Homebrew | |
run: | | |
brew update | |
brew install gitversion jq nuget | |
brew install abseil googletest google-benchmark | |
- name: Run Build Script | |
run: ./build.sh | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifacts | |
path: bin/artifacts/ | |
Windows: | |
name: Windows Build | |
runs-on: windows-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Dependencies via Chocolatey | |
shell: powershell | |
run: | | |
choco install gitversion.portable -y | |
choco install jq -y | |
vcpkg install abseil | |
- name: Run Build Script | |
shell: cmd | |
run: build.bat | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifacts | |
path: bin\artifacts\ |