-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from tenko/github-actions
GitHub actions
- Loading branch information
Showing
3 changed files
with
188 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Linux CI Build | ||
|
||
on: | ||
push: | ||
branches: [ $default-branch ] | ||
pull_request: | ||
branches: [ $default-branch ] | ||
workflow_dispatch : | ||
|
||
env: | ||
build_type: Release | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install packages | ||
run: | | ||
sudo apt-get update && | ||
sudo apt-get install libboost-all-dev libboost-filesystem-dev python3-pip | ||
- name: Install Clang 17 | ||
run: | | ||
wget https://apt.llvm.org/llvm.sh | ||
chmod +x ./llvm.sh | ||
sudo ./llvm.sh 17 all | ||
- name: Install lit & filecheck | ||
run: | | ||
sudo pip3 install lit | ||
sudo pip3 install filecheck | ||
- name: Configure CMake | ||
run: > | ||
cmake -B ${{ github.workspace }}/build -S ${{ github.workspace }} | ||
-DLLVM_ROOT=/usr/lib/llvm-17 | ||
-DBoost_NO_BOOST_CMAKE=ON | ||
-DCMAKE_CXX_COMPILER=clang++-17 | ||
-DCMAKE_C_COMPILER=clang-17 | ||
- name: Build | ||
run: cmake --build ${{ github.workspace }}/build --config ${{ env.build_type }} | ||
|
||
- name: Install | ||
run: cmake --install ${{ github.workspace }}/build --prefix install | ||
|
||
- name: Test | ||
run: cd ${{ github.workspace }}/build && make test >test_report_linux.txt || true | ||
|
||
- name: Upload build | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: binary-linux-release | ||
path: ${{ github.workspace }}/install/**/* | ||
|
||
- name: Upload report | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: test_report_msys2.txt | ||
path: ${{ github.workspace }}/build/test_report_linux.txt | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: MacOS CI Build | ||
|
||
on: | ||
push: | ||
branches: [ $default-branch ] | ||
pull_request: | ||
branches: [ $default-branch ] | ||
workflow_dispatch: | ||
|
||
env: | ||
build_type: Release | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install packages | ||
run: | | ||
brew install git && | ||
brew install make && | ||
brew install cmake && | ||
brew install llvm@17 && | ||
brew install boost && | ||
brew install python | ||
- name: Install lit & filecheck | ||
run: | | ||
pip install lit && | ||
pip install filecheck | ||
- name: Configure CMake | ||
run: > | ||
cmake -B ${{ github.workspace }}/build -S ${{ github.workspace }} -G "Unix Makefiles" | ||
-DLLVM_DIR=/opt/homebrew/opt/llvm@17/lib/cmake/llvm/ | ||
-DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm@17/bin/clang++ | ||
-DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm@17/bin/clang | ||
- name: Build | ||
run: cmake --build ${{ github.workspace }}/build --config ${{ env.build_type }} | ||
|
||
- name: Install | ||
run: cmake --install ${{ github.workspace }}/build --prefix install | ||
|
||
- name: Test | ||
run: cd ${{ github.workspace }}/build && make test >test_report_macos.txt | ||
|
||
- name: Upload build | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: binary-macos-release | ||
path: ${{ github.workspace }}/install/**/* | ||
|
||
- name: Upload report | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: test_report_macos.txt | ||
path: ${{ github.workspace }}/build/test_report_macos.txt |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: MSYS2 CI Build | ||
|
||
on: | ||
push: | ||
branches: [ $default-branch ] | ||
pull_request: | ||
branches: [ $default-branch ] | ||
workflow_dispatch: | ||
|
||
env: | ||
build_type: Release | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
defaults: | ||
run: | ||
shell: msys2 {0} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: CLANG64 | ||
update: true | ||
|
||
- name: Install packages | ||
run: | | ||
pacman --noconfirm -S git && | ||
pacman --noconfirm -S make && | ||
pacman --noconfirm -S mingw-w64-clang-x86_64-python-pip && | ||
pacman --noconfirm -S mingw-w64-clang-x86_64-toolchain && | ||
pacman --noconfirm -S mingw-w64-clang-x86_64-boost && | ||
pacman --noconfirm -S mingw-w64-clang-x86_64-cmake | ||
- name: Install lit & filecheck | ||
run: | | ||
pip3 install lit && | ||
pip3 install filecheck | ||
- name: Configure CMake | ||
run: > | ||
cmake -B "$GITHUB_WORKSPACE"/build | ||
-S "$GITHUB_WORKSPACE" -G "MSYS Makefiles" | ||
- name: Build | ||
run: cmake --build "$GITHUB_WORKSPACE"/build --config ${{ env.build_type }} | ||
|
||
- name: Install | ||
run: cmake --install "$GITHUB_WORKSPACE"/build --prefix install | ||
|
||
- name: Test | ||
run: cd "$GITHUB_WORKSPACE"/build && make test >test_report_msys2.txt | ||
|
||
- name: Upload build | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: binary-msys2-release | ||
path: ${{ github.workspace }}/install/**/* | ||
|
||
- name: Upload report | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: test_report_msys2.txt | ||
path: ${{ github.workspace }}/build/test_report_msys2.txt |