diff --git a/.github/actions/setup/mmtkbuilder/action.yml b/.github/actions/setup/mmtkbuilder/action.yml deleted file mode 100644 index c9acfd9..0000000 --- a/.github/actions/setup/mmtkbuilder/action.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: MMTk Builder -description: >- - Installs and configures OS Ruby build deps and Rust for MMTk - -inputs: - os: - desciption: Short string representing OS (ubuntu|macos) - required: true - default: ubuntu - - mmtk_plan: - description: the MMTk plan name to store in the environment - require: true - default: MarkSweep - - mmtk_build: - description: The MMTk build (debug|release) - require: true - default: release - -runs: - using: composite - steps: - - name: Install libraries (macOS) - shell: bash - uses: ./.github/actions/setup/macos - if: ${{ contains(inputs.os, 'macos') }} - - - name: Install libraries (Ubuntu) - shell: bash - uses: ./.github/actions/setup/ubuntu - if: ${{ contains(inputs.os, 'ubuntu') }} - - - uses: actions-rust-lang/setup-rust-toolchain@v1 - - name: Set MMTk environment variables - shell: bash - run: | - if [[ ${{ inputs.mmtk_build }} == debug ]]; then - echo 'RUST_LOG=' >> $GITHUB_ENV - # Debug builds run much slower so we should increase the timeout - echo 'RUBY_TEST_TIMEOUT_SCALE=10' >> $GITHUB_ENV - # SYNTAX_SUGGEST_TIMEOUT defaults to 1 second - echo 'SYNTAX_SUGGEST_TIMEOUT=60' >> $GITHUB_ENV - fi - echo 'MMTK_PLAN=${{ inputs.mmtk_plan }}' >> $GITHUB_ENV - - - uses: ruby/setup-ruby@a6e6f86333f0a2523ece813039b8b4be04560854 # v1.190.0 - shell: bash - with: - ruby-version: '3.3' - if: ${{ contains(inputs.os, 'ubuntu') }} - - - name: make sure that kern.coredump=1 - shell: bash - run: | - sysctl -n kern.coredump - sudo sysctl -w kern.coredump=1 - sudo chmod -R +rwx /cores/ - if: ${{ contains(inputs.os, 'macos') }} - diff --git a/.github/workflows/mmtk-builder.yml b/.github/workflows/mmtk-builder.yml new file mode 100644 index 0000000..c65db3e --- /dev/null +++ b/.github/workflows/mmtk-builder.yml @@ -0,0 +1,62 @@ +name: MMTk Builder +description: >- + Installs and configures OS Ruby build deps and Rust for MMTk + +on: + workflow_call: + inputs: + os: + desciption: Short string representing OS (ubuntu|macos) + required: true + default: ubuntu + + mmtk_plan: + description: the MMTk plan name to store in the environment + require: true + default: MarkSweep + + mmtk_build: + description: The MMTk build (debug|release) + require: true + default: release + +jobs: + build: + steps: + - name: Install libraries (macOS) + shell: bash + uses: ./.github/actions/setup/macos + if: ${{ contains(inputs.os, 'macos') }} + + - name: Install libraries (Ubuntu) + shell: bash + uses: ./.github/actions/setup/ubuntu + if: ${{ contains(inputs.os, 'ubuntu') }} + + - uses: actions-rust-lang/setup-rust-toolchain@v1 + - name: Set MMTk environment variables + shell: bash + run: | + if [[ ${{ inputs.mmtk_build }} == debug ]]; then + echo 'RUST_LOG=' >> $GITHUB_ENV + # Debug builds run much slower so we should increase the timeout + echo 'RUBY_TEST_TIMEOUT_SCALE=10' >> $GITHUB_ENV + # SYNTAX_SUGGEST_TIMEOUT defaults to 1 second + echo 'SYNTAX_SUGGEST_TIMEOUT=60' >> $GITHUB_ENV + fi + echo 'MMTK_PLAN=${{ inputs.mmtk_plan }}' >> $GITHUB_ENV + + - uses: ruby/setup-ruby@a6e6f86333f0a2523ece813039b8b4be04560854 # v1.190.0 + shell: bash + with: + ruby-version: '3.3' + if: ${{ contains(inputs.os, 'ubuntu') }} + + - name: make sure that kern.coredump=1 + shell: bash + run: | + sysctl -n kern.coredump + sudo sysctl -w kern.coredump=1 + sudo chmod -R +rwx /cores/ + if: ${{ contains(inputs.os, 'macos') }} + diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7a2ece1..ffde23f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,14 +32,16 @@ jobs: runs-on: ${{ matrix.os }} + build: + uses: ./.github/workflows/mmtk-builder.yml + with: + os: ${{ matrix.os }} + mmtk_plan: ${{ matrix.gc.mmtk_plan }} + mmtk_build: ${{ matrix.gc.mmtk_build }} + + steps: - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - - uses: ./.github/actions/setup/mmtkbuilder - with: - os: ${{ matrix.os }} - mmtk_plan: ${{ matrix.gc.mmtk_plan }} - mmtk_build: ${{ matrix.gc.mmtk_build }} - - name: Install Bundler dependencies run: bundle install