more cmake github actions. #17
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
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage. | |
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml | |
name: CMake FhatOS using Ubuntu | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Action Information | |
run: | | |
whoami | |
sudo chmod 777 --recursive /usr/local | |
- name: Install Python | |
uses: actions/setup-python@v1 | |
- name: Install PlatformIO | |
run: | | |
python -m pip install --upgrade pip | |
pip install platformio | |
- name: Created Faux WiFi Configuration | |
working-directory: ${{github.workspace}} | |
run: | | |
touch .wifi.ini | |
echo "[wifi]" >> .wifi.ini | |
echo "build_flags =" >> .wifi.ini | |
echo " -DWIFI_SSID=fhatos" >> .wifi.ini | |
echo " -DWIFI_PASS=fhatos" >> .wifi.ini | |
echo " -DMQTT_BROKER_ADDR=fhatos.org" >> .wifi.ini | |
echo " -DMQTT_BROKER_PORT=1833" >> .wifi.ini | |
chmod 664 .wifi.ini | |
- name: Install PlatformIO Library | |
run: | | |
pio lib install | |
export PATH=$PATH:$HOME/.local/bin | |
sudo ln -s ~/.platformio/penv/bin/platformio ~/.local/bin/platformio | |
sudo ln -s ~/.platformio/penv/bin/pio ~/.local/bin/pio | |
sudo ln -s ~/.platformio/penv/bin/piodebuggdb ~/.local/bin/piodebuggdb | |
- name: Fhat-Dev Build | |
working-directory: ${{github.workspace}} | |
env: | |
CC: clang | |
run: | | |
export PATH=$PATH:$HOME/.local/bin | |
chmod 777 bin/fhat-dev | |
sudo bin/fhat-dev build | |
- name: Fhat-Dev Test | |
working-directory: ${{github.workspace}} | |
env: | |
CC: clang | |
run: | | |
export PATH=$PATH:$HOME/.local/bin | |
chmod 777 bin/fhat-dev | |
sudo bin/fhat-dev test | |
# - name: Cmake | |
# working-directory: ${{github.workspace}} | |
# run: cmake . | |
# - name: Make | |
# working-directory: ${{github.workspace}} | |
# run: make | |
# - name: CTest | |
# working-directory: ${{github.workspace}}/test | |
# run: ctest | |