From 7091817f639ebdd3d7c1840f6f190a5791a8bdbb Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Fri, 12 Jul 2024 12:25:56 -0400 Subject: [PATCH 1/2] Update [ghstack-poisoned] --- ...e_build.yml => runtime_build_and_test.yml} | 131 ++++++++++++++++++ .github/workflows/runtime_fizz.yml | 33 ----- .github/workflows/runtime_flags.yml | 31 ----- .github/workflows/runtime_flow.yml | 50 ------- .github/workflows/runtime_test.yml | 60 -------- 5 files changed, 131 insertions(+), 174 deletions(-) rename .github/workflows/{runtime_build.yml => runtime_build_and_test.yml} (57%) delete mode 100644 .github/workflows/runtime_fizz.yml delete mode 100644 .github/workflows/runtime_flags.yml delete mode 100644 .github/workflows/runtime_flow.yml delete mode 100644 .github/workflows/runtime_test.yml diff --git a/.github/workflows/runtime_build.yml b/.github/workflows/runtime_build_and_test.yml similarity index 57% rename from .github/workflows/runtime_build.yml rename to .github/workflows/runtime_build_and_test.yml index 304f03482ddbd..0d8e57d9cda11 100644 --- a/.github/workflows/runtime_build.yml +++ b/.github/workflows/runtime_build_and_test.yml @@ -11,6 +11,137 @@ env: TZ: /usr/share/zoneinfo/America/Los_Angeles jobs: + # ----- FLOW ----- + discover_flow_inline_configs: + name: Discover flow inline configs + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.result }} + steps: + - uses: actions/checkout@v4 + - uses: actions/github-script@v7 + id: set-matrix + with: + script: | + const inlinedHostConfigs = require('./scripts/shared/inlinedHostConfigs.js'); + return inlinedHostConfigs.map(config => config.shortName); + + flow: + name: Flow check ${{ matrix.flow_inline_config_shortname }} + needs: discover_flow_inline_configs + runs-on: ubuntu-latest + continue-on-error: true + strategy: + matrix: + flow_inline_config_shortname: ${{ fromJSON(needs.discover_flow_inline_configs.outputs.matrix) }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18.20.1 + cache: yarn + cache-dependency-path: yarn.lock + - name: Restore cached node_modules + uses: actions/cache@v4 + id: node_modules + with: + path: "**/node_modules" + key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} + - run: yarn install --frozen-lockfile + - run: node ./scripts/tasks/flow-ci ${{ matrix.flow_inline_config_shortname }} + + # ----- FIZZ ----- + check_generated_fizz_runtime: + name: Confirm generated inline Fizz runtime is up to date + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18.20.1 + cache: yarn + cache-dependency-path: yarn.lock + - name: Restore cached node_modules + uses: actions/cache@v4 + id: node_modules + with: + path: "**/node_modules" + key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} + - run: yarn install --frozen-lockfile + - run: | + yarn generate-inline-fizz-runtime + git diff --quiet || (echo "There was a change to the Fizz runtime. Run `yarn generate-inline-fizz-runtime` and check in the result." && false) + + # ----- FEATURE FLAGS ----- + flags: + name: Check flags + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18.20.1 + cache: yarn + cache-dependency-path: yarn.lock + - name: Restore cached node_modules + uses: actions/cache@v4 + id: node_modules + with: + path: "**/node_modules" + key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} + - run: yarn install --frozen-lockfile + - run: yarn flags + + # ----- TESTS ----- + test: + name: yarn test ${{ matrix.params }} (Shard ${{ matrix.shard }}) + runs-on: ubuntu-latest + strategy: + matrix: + params: + - "-r=stable --env=development" + - "-r=stable --env=production" + - "-r=experimental --env=development" + - "-r=experimental --env=production" + - "-r=www-classic --env=development --variant=false" + - "-r=www-classic --env=production --variant=false" + - "-r=www-classic --env=development --variant=true" + - "-r=www-classic --env=production --variant=true" + - "-r=www-modern --env=development --variant=false" + - "-r=www-modern --env=production --variant=false" + - "-r=www-modern --env=development --variant=true" + - "-r=www-modern --env=production --variant=true" + - "-r=xplat --env=development --variant=false" + - "-r=xplat --env=development --variant=true" + - "-r=xplat --env=production --variant=false" + - "-r=xplat --env=production --variant=true" + # TODO: Test more persistent configurations? + - "-r=stable --env=development --persistent" + - "-r=experimental --env=development --persistent" + shard: + - 1/5 + - 2/5 + - 3/5 + - 4/5 + - 5/5 + continue-on-error: true + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18.20.1 + cache: yarn + cache-dependency-path: yarn.lock + - name: Restore cached node_modules + uses: actions/cache@v4 + id: node_modules + with: + path: "**/node_modules" + key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} + - run: yarn install --frozen-lockfile + - run: yarn test ${{ matrix.params }} --ci=github --shard=${{ matrix.shard }} + + # ----- BUILD ----- build_and_lint: name: yarn build and lint runs-on: ubuntu-latest diff --git a/.github/workflows/runtime_fizz.yml b/.github/workflows/runtime_fizz.yml deleted file mode 100644 index 97e4a0f7be677..0000000000000 --- a/.github/workflows/runtime_fizz.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: (Runtime) Fizz - -on: - push: - branches: [main] - pull_request: - paths-ignore: - - compiler/** - -env: - TZ: /usr/share/zoneinfo/America/Los_Angeles - -jobs: - check_generated_fizz_runtime: - name: Confirm generated inline Fizz runtime is up to date - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18.20.1 - cache: yarn - cache-dependency-path: yarn.lock - - name: Restore cached node_modules - uses: actions/cache@v4 - id: node_modules - with: - path: "**/node_modules" - key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} - - run: yarn install --frozen-lockfile - - run: | - yarn generate-inline-fizz-runtime - git diff --quiet || (echo "There was a change to the Fizz runtime. Run `yarn generate-inline-fizz-runtime` and check in the result." && false) diff --git a/.github/workflows/runtime_flags.yml b/.github/workflows/runtime_flags.yml deleted file mode 100644 index 178d015bbf587..0000000000000 --- a/.github/workflows/runtime_flags.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: (Runtime) Flags - -on: - push: - branches: [main] - pull_request: - paths-ignore: - - compiler/** - -env: - TZ: /usr/share/zoneinfo/America/Los_Angeles - -jobs: - flags: - name: Check flags - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18.20.1 - cache: yarn - cache-dependency-path: yarn.lock - - name: Restore cached node_modules - uses: actions/cache@v4 - id: node_modules - with: - path: "**/node_modules" - key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} - - run: yarn install --frozen-lockfile - - run: yarn flags diff --git a/.github/workflows/runtime_flow.yml b/.github/workflows/runtime_flow.yml deleted file mode 100644 index bba1faaf9fd40..0000000000000 --- a/.github/workflows/runtime_flow.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: (Runtime) Flow - -on: - push: - branches: [main] - pull_request: - paths-ignore: - - compiler/** - -env: - TZ: /usr/share/zoneinfo/America/Los_Angeles - -jobs: - discover_flow_inline_configs: - name: Discover flow inline configs - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.set-matrix.outputs.result }} - steps: - - uses: actions/checkout@v4 - - uses: actions/github-script@v7 - id: set-matrix - with: - script: | - const inlinedHostConfigs = require('./scripts/shared/inlinedHostConfigs.js'); - return inlinedHostConfigs.map(config => config.shortName); - - flow: - name: Flow check ${{ matrix.flow_inline_config_shortname }} - needs: discover_flow_inline_configs - runs-on: ubuntu-latest - continue-on-error: true - strategy: - matrix: - flow_inline_config_shortname: ${{ fromJSON(needs.discover_flow_inline_configs.outputs.matrix) }} - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18.20.1 - cache: yarn - cache-dependency-path: yarn.lock - - name: Restore cached node_modules - uses: actions/cache@v4 - id: node_modules - with: - path: "**/node_modules" - key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} - - run: yarn install --frozen-lockfile - - run: node ./scripts/tasks/flow-ci ${{ matrix.flow_inline_config_shortname }} diff --git a/.github/workflows/runtime_test.yml b/.github/workflows/runtime_test.yml deleted file mode 100644 index 84cfe79e5d3d7..0000000000000 --- a/.github/workflows/runtime_test.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: (Runtime) Test - -on: - push: - branches: [main] - pull_request: - paths-ignore: - - compiler/** - -env: - TZ: /usr/share/zoneinfo/America/Los_Angeles - -jobs: - test: - name: yarn test ${{ matrix.params }} (Shard ${{ matrix.shard }}) - runs-on: ubuntu-latest - strategy: - matrix: - params: - - "-r=stable --env=development" - - "-r=stable --env=production" - - "-r=experimental --env=development" - - "-r=experimental --env=production" - - "-r=www-classic --env=development --variant=false" - - "-r=www-classic --env=production --variant=false" - - "-r=www-classic --env=development --variant=true" - - "-r=www-classic --env=production --variant=true" - - "-r=www-modern --env=development --variant=false" - - "-r=www-modern --env=production --variant=false" - - "-r=www-modern --env=development --variant=true" - - "-r=www-modern --env=production --variant=true" - - "-r=xplat --env=development --variant=false" - - "-r=xplat --env=development --variant=true" - - "-r=xplat --env=production --variant=false" - - "-r=xplat --env=production --variant=true" - # TODO: Test more persistent configurations? - - "-r=stable --env=development --persistent" - - "-r=experimental --env=development --persistent" - shard: - - 1/5 - - 2/5 - - 3/5 - - 4/5 - - 5/5 - continue-on-error: true - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 18.20.1 - cache: yarn - cache-dependency-path: yarn.lock - - name: Restore cached node_modules - uses: actions/cache@v4 - id: node_modules - with: - path: "**/node_modules" - key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} - - run: yarn install --frozen-lockfile - - run: yarn test ${{ matrix.params }} --ci=github --shard=${{ matrix.shard }} From 8db6c40da34135f42e690f1ab8d8e2357511db8c Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Fri, 12 Jul 2024 12:26:30 -0400 Subject: [PATCH 2/2] Update [ghstack-poisoned] --- .github/workflows/runtime_build_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/runtime_build_and_test.yml b/.github/workflows/runtime_build_and_test.yml index 0d8e57d9cda11..a90a983cbce04 100644 --- a/.github/workflows/runtime_build_and_test.yml +++ b/.github/workflows/runtime_build_and_test.yml @@ -1,4 +1,4 @@ -name: (Runtime) Build +name: (Runtime) Build and Test on: push: