Skip to content

Commit

Permalink
Fix and finish setup of CI
Browse files Browse the repository at this point in the history
- Use apt erlang instead of setup-beam in esp-idf container
- Remove unnecessary git configuration
- Add missing app src file to help generate documentation
- Add missing dependencies
- Fix paths
- Add publish doc workflow

Signed-off-by: Paul Guyot <pguyot@kallisys.net>
  • Loading branch information
pguyot committed May 7, 2024
1 parent 3b9b836 commit 05ffac1
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 23 deletions.
27 changes: 5 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ jobs:
idf-version:
- 'v5.1.3'
- 'v5.2.1'
otp:
- "26"
elixir_version:
- "1.16"

container: espressif/idf:release-v5.2
steps:
Expand All @@ -31,28 +27,15 @@ jobs:
- name: Checkout atomvm_esp_adf
uses: actions/checkout@v3
with:
path: AtomVM/src/platform/esp32/components/

- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir_version }}
path: AtomVM/src/platform/esp32/components/atomvm_esp_adf/

- name: Install dependencies to build host AtomVM
run: |
set -eu
apt update
DEBIAN_FRONTEND=noninteractive apt install -y -q \
doxygen \
libglib2.0-0 libpixman-1-0 \
gcc g++ zlib1g-dev libsdl2-2.0-0 libslirp0 libmbedtls-dev
# needed for generating AtomVM version when running in a docker container
- name: Configure Git
run: |
git config --global --add safe.directory /__w/AtomVM/AtomVM
echo -n "git rev-parse: "
git rev-parse --short HEAD
doxygen erlang-base erlang-dialyzer elixir \
gcc g++ zlib1g-dev libmbedtls-dev make cmake
- name: Build AtomVM libraries
shell: bash
Expand All @@ -76,7 +59,7 @@ jobs:
idf.py build
- name: "Create a ${{ matrix.soc }} image"
working-directory: ./src/platforms/esp32/build
working-directory: AtomVM/src/platforms/esp32/build
run: |
./mkimage.sh
ls -l *.img
Expand All @@ -85,7 +68,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: atomvm-${{ matrix.soc }}-image
path: ./src/platforms/esp32/build/atomvm-${{ matrix.soc }}.img
path: AtomVM/src/platforms/esp32/build/atomvm-${{ matrix.soc }}.img
if-no-files-found: error

build-doc:
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/doc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build and deploy documentation

on:
push:
branches: ["main"]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
doc:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
container: erlang:26
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build edoc
run: |
rebar3 edoc
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: doc
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
12 changes: 12 additions & 0 deletions src/atomvm_esp_adf.app.src
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
application, atomvm_esp_adf, [
{description, "Port of ESP ADF for the AtomVM platform"},
{vsn, "0.1.0"},
{registered, []},
{applications, [kernel, stdlib]},
{env,[]},
{modules, []},
{licenses, ["MIT"]},
{links, []}
]
}.
2 changes: 1 addition & 1 deletion src/esp_adf_audio_pipeline.erl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ register(_AudioPipeline, _AudioElement, _Name) ->
%% @param AudioElement element to unregister
%% @return ok
-spec unregister(audio_pipeline(), audio_element:audio_element()) -> ok.
unregister(_AudioPipeline, _AudioElement, _Name) ->
unregister(_AudioPipeline, _AudioElement) ->
erlang:nif_error(undefined).

%% @doc Link audio elements, i.e. define the pipeline order.
Expand Down

0 comments on commit 05ffac1

Please sign in to comment.