name: build-hermesc-linux description: This action builds hermesc for linux platforms inputs: hermes-version: required: True description: The version of Hermes react-native-version: required: True description: The version of React Native runs: using: composite steps: - name: Install dependencies shell: bash run: | sudo apt update sudo apt install -y git openssh-client cmake build-essential \ libreadline-dev libicu-dev jq zip python3 - name: Restore Hermes workspace uses: ./.github/actions/restore-hermes-workspace - name: Linux cache uses: actions/cache@v4 with: key: v1-hermes-${{ github.job }}-linux-${{ inputs.hermes-version }}-${{ inputs.react-native-version }} path: | /tmp/hermes/linux64-bin/ /tmp/hermes/hermes/destroot/ - name: Set up workspace shell: bash run: | mkdir -p /tmp/hermes/linux64-bin - name: Build HermesC for Linux shell: bash run: | if [ -f /tmp/hermes/linux64-bin/hermesc ]; then echo 'Skipping; Clean "/tmp/hermes/linux64-bin" to rebuild.' else cd /tmp/hermes cmake -S hermes -B build -DHERMES_STATIC_LINK=ON -DCMAKE_BUILD_TYPE=Release -DHERMES_ENABLE_TEST_SUITE=OFF \ -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DCMAKE_CXX_FLAGS=-s -DCMAKE_C_FLAGS=-s \ -DCMAKE_EXE_LINKER_FLAGS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive" cmake --build build --target hermesc -j 4 cp /tmp/hermes/build/bin/hermesc /tmp/hermes/linux64-bin/. fi - name: Upload linux artifacts uses: actions/upload-artifact@v4.3.4 with: name: hermes-linux-bin path: /tmp/hermes/linux64-bin