From 64d11fcf11b70edb48f75f55942e8a4c7856bf7a Mon Sep 17 00:00:00 2001 From: MoustaphaSaad Date: Fri, 31 May 2024 21:29:14 +0300 Subject: add initial Emscripten CI workflow --- .github/workflows/emscripten.yml | 68 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/emscripten.yml diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml new file mode 100644 index 0000000..c4e896f --- /dev/null +++ b/.github/workflows/emscripten.yml @@ -0,0 +1,68 @@ +# GitHub Actions workflow to run tests on Linux. +name: "Emscripten" + +on: + push: {} + pull_request: {} + schedule: + - cron: "0 0 * * *" # At 00:00 daily. + +concurrency: + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + test: + name: "Emscripten" + runs-on: "ubuntu-latest" + if: ${{ github.repository_owner == 'libressl' || github.event_name != 'schedule' }} + permissions: + contents: read + steps: + - name: "Checkout repository" + uses: actions/checkout@v4 + + - name: "Setup emsdk" + uses: mymindstorm/setup-emsdk@v14 + with: + version: 3.1.60 + + - name: "Prepare repository" + run: "./autogen.sh" + + - name: "Configure CMake" + run: cmake -Bbuild -DCMAKE_CROSSCOMPILING_EMULATOR=$EMSDK/node/18.20.3_64bit/bin/node -DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DENABLE_ASM=OFF + + - name: "Build" + run: cmake --build build --config Release + + - name: "Test" + run: ctest --test-dir build -C Release --output-on-failure + + # Test ASAN with and without ASM enabled. + test-asan: + name: "ASAN (no-asm)" + runs-on: "ubuntu-latest" + if: ${{ github.repository_owner == 'libressl' || github.event_name != 'schedule' }} + permissions: + contents: read + steps: + - name: "Checkout repository" + uses: actions/checkout@v4 + + - name: "Setup emsdk" + uses: mymindstorm/setup-emsdk@v14 + with: + version: 3.1.60 + + - name: "Prepare repository" + run: "./autogen.sh" + + - name: "Configure CMake" + run: cmake -Bbuild -DCMAKE_CROSSCOMPILING_EMULATOR=$EMSDK/node/18.20.3_64bit/bin/node -DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DENABLE_ASM=OFF + + - name: "Build" + run: cmake --build build --config Release + + - name: "Test" + run: ctest --test-dir build -C Release --output-on-failure -- cgit v1.2.3-55-g6feb