fixes for macos #32
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: C/C++ CI | |
on: | |
push: | |
branches: [master] | |
paths: | |
- 'src/**' | |
- 'include/**' | |
- '.github/**' | |
- '.github/workflows/*' | |
pull_request: | |
branches: [master] | |
jobs: | |
notification: | |
runs-on: ubuntu-latest | |
name: Notify start to gitlama | |
outputs: | |
branch: ${{ steps.extract_branch.outputs.branch }} | |
steps: | |
- name: Extract Branch name | |
id: extract_branch | |
shell: bash | |
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT | |
- name: IRC notification | |
uses: Gottox/irc-message-action@v2 | |
with: | |
server: irc.uvt.nl | |
channel: '#gitlama' | |
nickname: GitHub | |
message: > | |
${{ github.actor }} started a build of Mbt | |
[${{ steps.extract_branch.outputs.branch }}] | |
build: | |
runs-on: ${{ matrix.os }} | |
needs: notification | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
compiler: [g++, clang++] | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.12.1 | |
with: | |
access_token: ${{ github.token }} | |
- uses: actions/checkout@v4.1.1 | |
- name: Install Build Environment | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
sudo apt-get install pkg-config autoconf-archive | |
else | |
brew upgrade; | |
brew install pkg-config | |
brew install libtool | |
brew install autoconf-archive | |
brew install autoconf | |
brew install automake | |
fi | |
- name: Install Dependencies | |
run: | | |
if [ "$RUNNER_OS" == "Linux" ]; then | |
sudo apt-get install libicu-dev libxml2-dev libbz2-dev | |
sudo apt-get install zlib1g-dev cppcheck | |
else | |
brew install libxml2 | |
brew install bzip2 | |
brew install zlib | |
brew install cppcheck | |
fi | |
- name: install TiccUtils | |
env: | |
CXX: ${{ matrix.compiler }} | |
run: | | |
git clone https://github.com/LanguageMachines/ticcutils; | |
cd ticcutils; | |
bash bootstrap.sh; | |
./configure; | |
make; | |
sudo make install; | |
cd ..; | |
- name: install TiMBL | |
env: | |
CXX: ${{ matrix.compiler }} | |
run: | | |
git clone https://github.com/LanguageMachines/timbl; | |
cd timbl; | |
bash bootstrap.sh; | |
./configure; | |
make; | |
sudo make install; | |
cd ..; | |
- name: bootstrap | |
run: sh bootstrap.sh | |
- name: configure | |
env: | |
CXX: ${{ matrix.compiler }} | |
run: ./configure | |
- name: compiler-id | |
id: compiler | |
run: | | |
id=$(echo ${{matrix.compiler}} | cut -d\+ -f1) | |
echo "id=$id" >> $GITHUB_OUTPUT | |
- name: Static Code-check | |
run: cppcheck --enable=all --suppress=missingIncludeSystem -I include -I /usr/local/include --quiet --error-exitcode=0 -I include . | |
- name: make | |
run: make | |
- name: install | |
run: sudo make install | |
- name: make check | |
env: | |
CXX: ${{ matrix.compiler }} | |
run: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib make check | |
continue-on-error: true | |
- name: show log | |
run: cat src/test-suite.log | |
- name: Notify IRC of failure | |
if: ${{ failure() }} | |
uses: Gottox/irc-message-action@v2 | |
with: | |
server: irc.uvt.nl | |
channel: '#gitlama' | |
nickname: GH-${{ runner.os }}-${{ steps.compiler.outputs.id }} | |
message: "mbt [${{ needs.notification.outputs.branch }}] build with ${{ matrix.compiler }} by ${{ github.actor }} on ${{ matrix.os }}: \u00034FAIL\u0003" | |
- name: Notify IRC of succes | |
if: ${{ success() }} | |
uses: Gottox/irc-message-action@v2 | |
with: | |
server: irc.uvt.nl | |
channel: '#gitlama' | |
nickname: GH-${{ runner.os }}-${{ steps.compiler.outputs.id }} | |
message: "mbt [${{ needs.notification.outputs.branch }}] build with ${{ matrix.compiler }} by ${{ github.actor }} on ${{ matrix.os }}: \u00033SUCCESS\u0003" |