From 3d19eebba0a33819913581b927ad4b2799aeacbf Mon Sep 17 00:00:00 2001 From: Daniel Bertalan Date: Sun, 6 Aug 2023 20:34:28 +0200 Subject: [PATCH] CI: Remove workflows dependent on the LibJS website The linusg/libjs-website repository, which houses the sources for libjs.dev, has recently been archived. Because of this, we can no longer update the test262 results page or the Wasm repl :^(. Let's remove these GitHub Actions workflows to make CI green again. We'll eventually need something similar once the situation with the website is sorted out, but having this in git history is enough for that. --- .github/workflows/libjs-test262.yml | 178 ---------------------------- .github/workflows/wasm.yml | 106 ----------------- 2 files changed, 284 deletions(-) delete mode 100644 .github/workflows/libjs-test262.yml delete mode 100644 .github/workflows/wasm.yml diff --git a/.github/workflows/libjs-test262.yml b/.github/workflows/libjs-test262.yml deleted file mode 100644 index 1059a15dcbf..00000000000 --- a/.github/workflows/libjs-test262.yml +++ /dev/null @@ -1,178 +0,0 @@ -name: Run test262 with LibJS and push results to the website repo - -on: [push] - -env: - SERENITY_SOURCE_DIR: ${{ github.workspace }} - -jobs: - run_and_update_results: - runs-on: self-hosted - if: always() && github.repository == 'SerenityOS/serenity' && github.ref == 'refs/heads/master' - - concurrency: libjs-test262 - - steps: - - name: Cleanup - run: | - echo "Cleaning up previous run" - rm -rf "${{ github.workspace }}/*" - - - name: Checkout SerenityOS/serenity - uses: actions/checkout@v3 - - - name: Checkout SerenityOS/libjs-test262 - uses: actions/checkout@v3 - with: - repository: SerenityOS/libjs-test262 - path: libjs-test262 - - - name: Checkout linusg/libjs-website - uses: actions/checkout@v3 - with: - repository: linusg/libjs-website - path: libjs-website - - - name: Checkout tc39/test262 - uses: actions/checkout@v3 - with: - repository: tc39/test262 - path: test262 - - - name: Checkout tc39/test262-parser-tests - uses: actions/checkout@v3 - with: - repository: tc39/test262-parser-tests - path: test262-parser-tests - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y ninja-build unzip gcc-12 g++-12 jq wget - test -e /opt/wabt-1.0.27 || ( - cd /tmp - wget https://github.com/WebAssembly/wabt/releases/download/1.0.27/wabt-1.0.27-ubuntu.tar.gz - sudo tar xf wabt-1.0.27-ubuntu.tar.gz -C /opt - rm wabt-1.0.27-ubuntu.tar.gz - ) - - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - - name: Install Python dependencies - # The setup-python action set default python to python3.x. Note that we are not using system python here. - run: | - python -m pip install --upgrade pip - pip install -r libjs-test262/requirements.txt - - - name: Check versions - run: set +e; g++ --version; g++-12 --version; python --version; python3 --version; ninja --version - - - name: Create build directory - run: | - mkdir -p libjs-test262/Build/TZDB - mkdir -p libjs-test262/Build/UCD - mkdir -p libjs-test262/Build/CLDR - - - name: TimeZoneData cache - uses: actions/cache@v3 - with: - path: ${{ github.workspace }}/libjs-test262/Build/TZDB - key: TimeZoneData-${{ hashFiles('Meta/CMake/time_zone_data.cmake') }} - - - name: UnicodeData cache - uses: actions/cache@v3 - with: - path: ${{ github.workspace }}/libjs-test262/Build/UCD - key: UnicodeData-${{ hashFiles('Meta/CMake/unicode_data.cmake') }} - - - name: UnicodeLocale cache - uses: actions/cache@v3 - with: - path: ${{ github.workspace }}/libjs-test262/Build/CLDR - key: UnicodeLocale-${{ hashFiles('Meta/CMake/locale_data.cmake') }} - - - name: Build test262-runner, test-js and test-wasm - working-directory: libjs-test262 - run: | - cd Build - env PATH="/opt/wabt-1.0.27/bin:$PATH" \ - cmake -GNinja -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DWASM_SPEC_TEST_SKIP_FORMATTING=ON -DINCLUDE_WASM_SPEC_TESTS=ON -DSERENITY_SOURCE_DIR=${{ env.SERENITY_SOURCE_DIR }} .. - ninja test262-runner test-js test-wasm - - - name: Get previous results - working-directory: libjs-test262 - run: | - cp -f ../libjs-website/test262/data/per-file-master.json . - cp -f ../libjs-website/test262/data/per-file-bytecode-master.json . - cp -f ../libjs-website/wasm/data/per-file-master.json wasm-per-file-master.json - - - name: Run test262 and test262-parser-tests - working-directory: libjs-test262 - run: | - python3 run_all_and_update_results.py \ - --serenity .. \ - --test262 ../test262 \ - --test262-parser-tests ../test262-parser-tests \ - --results-json ../libjs-website/test262/data/results.json \ - --per-file-output ../libjs-website/test262/data/per-file-master.json \ - --per-file-bytecode-output ../libjs-website/test262/data/per-file-bytecode-master.json - - - name: Run test-wasm - working-directory: libjs-test262/Build - run: | - _deps/lagom-build/bin/test-wasm --per-file _deps/lagom-build/Userland/Libraries/LibWasm/Tests > ../../libjs-website/wasm/data/per-file-master.json || true - jq -nc -f /dev/stdin <<-EOF --slurpfile previous ../../libjs-website/wasm/data/results.json --slurpfile details ../../libjs-website/wasm/data/per-file-master.json > wasm-new-results.json - \$details[0] as \$details | \$previous[0] + [{ - "commit_timestamp": $(git -C ../.. log -1 --format=%ct), - "run_timestamp": $(date +%s), - "versions": { - "serenity": "$(git -C ../.. rev-parse HEAD)" - }, - "tests": { - "spectest": { - "duration": (\$details.duration), - "results": { - "total": (\$details.results | keys | length), - "passed": ([\$details.results | values[] | select(. == "PASSED")] | length), - "failed": ([\$details.results | values[] | select(. == "FAILED")] | length), - "skipped": ([\$details.results | values[] | select(. == "SKIPPED")] | length), - "process_error": ([\$details.results | values[] | select(. == "PROCESS_ERROR")] | length) - } - } - } - }] - EOF - mv wasm-new-results.json ../../libjs-website/wasm/data/results.json - - - name: Deploy to GitHub pages - uses: JamesIves/github-pages-deploy-action@v4.4.3 - with: - git-config-name: BuggieBot - git-config-email: buggiebot@serenityos.org - branch: main - repository-name: linusg/libjs-website - token: ${{ secrets.BUGGIEBOT_TOKEN }} - folder: libjs-website - - - name: Compare non-bytecode - continue-on-error: true - working-directory: libjs-test262 - run: ./per_file_result_diff.py -o per-file-master.json -n ../libjs-website/test262/data/per-file-master.json - - - name: Compare bytecode - continue-on-error: true - working-directory: libjs-test262 - run: ./per_file_result_diff.py -o per-file-bytecode-master.json -n ../libjs-website/test262/data/per-file-bytecode-master.json - - - name: Compare non-bytecode to bytecode - continue-on-error: true - working-directory: libjs-test262 - run: ./per_file_result_diff.py -o ../libjs-website/test262/data/per-file-master.json -n ../libjs-website/test262/data/per-file-bytecode-master.json - - - name: Compare wasm - continue-on-error: true - working-directory: libjs-test262 - run: ./per_file_result_diff.py -o wasm-per-file-master.json -n ../libjs-website/wasm/data/per-file-master.json diff --git a/.github/workflows/wasm.yml b/.github/workflows/wasm.yml deleted file mode 100644 index 1eb664484db..00000000000 --- a/.github/workflows/wasm.yml +++ /dev/null @@ -1,106 +0,0 @@ -name: Build Wasm Modules -on: [ push, pull_request ] - -env: - SERENITY_SOURCE_DIR: ${{ github.workspace }} - -concurrency: wasm - -jobs: - build: - runs-on: ubuntu-22.04 - if: github.repository == 'SerenityOS/serenity' - strategy: - fail-fast: false - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - name: "Install Ubuntu dependencies" - run: | - sudo apt-get update - sudo apt-get install -y ninja-build gcc-12 g++-12 libstdc++-12-dev - - name: "Install emscripten" - uses: mymindstorm/setup-emsdk@v12 - with: - version: 3.1.25 - - name: "Check versions" - run: | - set +e - emcc --version - ninja --version - gcc --version - - name: "Create build directories" - run: | - mkdir -p ${{ github.workspace }}/Build/caches/TZDB - mkdir -p ${{ github.workspace }}/Build/caches/UCD - mkdir -p ${{ github.workspace }}/Build/caches/CLDR - - name: "TimeZoneData cache" - uses: actions/cache@v3 - with: - path: ${{ github.workspace }}/Build/caches/TZDB - key: TimeZoneData-${{ hashFiles('Meta/CMake/time_zone_data.cmake') }} - - name: "UnicodeData cache" - uses: actions/cache@v3 - with: - path: ${{ github.workspace }}/Build/caches/UCD - key: UnicodeData-${{ hashFiles('Meta/CMake/unicode_data.cmake') }} - - name: "UnicodeLocale cache" - uses: actions/cache@v3 - with: - path: ${{ github.workspace }}/Build/caches/CLDR - key: UnicodeLocale-${{ hashFiles('Meta/CMake/locale_data.cmake') }} - - name: "Build host lagom tools" - run: | - cmake -GNinja \ - -B ${{ github.workspace }}/Build/lagom-tools \ - -S ${{ github.workspace }}/Meta/Lagom \ - -DBUILD_LAGOM=OFF \ - -DSERENITY_CACHE_DIR=${{ github.workspace }}/Build/caches \ - -DCMAKE_C_COMPILER=gcc-12 \ - -DCMAKE_CXX_COMPILER=g++-12 \ - -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/Build/lagom-tools \ - -Dpackage=LagomTools - - ninja -C ${{ github.workspace }}/Build/lagom-tools install - - name: "Create wasm build environment" - run: | - emcmake cmake -GNinja \ - -B ${{ github.workspace }}/Build/wasm \ - -S ${{ github.workspace }}/Meta/Lagom \ - -DLagomTools_DIR=${{ github.workspace }}/Build/lagom-tools/share/LagomTools \ - -DBUILD_LAGOM=ON \ - -DSERENITY_CACHE_DIR=${{ github.workspace }}/Build/caches \ - -DBUILD_SHARED_LIBS=OFF - - name: "Build libjs.{js,wasm}" - run: | - ninja -C ${{ github.workspace }}/Build/wasm libjs.js - - name: "Show me what you built :)" - run: | - ls -l ${{ github.workspace }}/Build/wasm - - - name: "Checkout linusg/libjs-website" - if: github.ref == 'refs/heads/master' - uses: actions/checkout@v3 - with: - repository: linusg/libjs-website - path: libjs-website - - - name: "Prepare updated REPL data" - if: github.ref == 'refs/heads/master' - run: | - cp ${{ github.workspace }}/Build/wasm/bin/libjs.js libjs-website/repl/libjs.js - cp ${{ github.workspace }}/Build/wasm/bin/libjs.wasm libjs-website/repl/libjs.wasm - echo 'Module.SERENITYOS_COMMIT = "${{ github.sha }}";' >> libjs-website/repl/libjs.js - - - name: "Deploy to GitHub Pages" - if: github.ref == 'refs/heads/master' - uses: JamesIves/github-pages-deploy-action@v4.4.3 - with: - git-config-name: BuggieBot - git-config-email: buggiebot@serenityos.org - branch: main - repository-name: linusg/libjs-website - token: ${{ secrets.BUGGIEBOT_TOKEN }} - folder: libjs-website