Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 0 additions & 98 deletions .github/scripts/build-matrix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,82 +2,6 @@
require "optparse"

BASE_MATRIX_ENTRIES = [
{
"build_os": "ubuntu-20.04",
"agent_query": "ubuntu-20.04",
"target": "ubuntu20.04_x86_64",
"containers": {
"main": "ghcr.io/swiftwasm/swift-ci:main-ubuntu-20.04",
"release-6.0": "ghcr.io/swiftwasm/swift-ci:main-ubuntu-20.04@sha256:9007661fb6d57ebef902618e831458e88068350b0ecc8d85e56441d25a9f4312",
"release-6.1": "ghcr.io/swiftwasm/swift-ci:main-ubuntu-20.04@sha256:9007661fb6d57ebef902618e831458e88068350b0ecc8d85e56441d25a9f4312",
},
"run_stdlib_test": true,
"run_full_test": false,
"run_e2e_test": true,
"build_hello_wasm": true,
"clean_build_dir": false,
"free_disk_space": true,
"only_swift_sdk": false,
},
{
"build_os": "ubuntu-22.04",
"agent_query": "ubuntu-22.04",
"target": "ubuntu22.04_x86_64",
"containers": {
"main": "ghcr.io/swiftwasm/swift-ci:main-ubuntu-22.04",
"release-6.0": "ghcr.io/swiftwasm/swift-ci:main-ubuntu-20.04@sha256:8060adba9c044b1fc751b9671167320c9cc0094d0a45d7b8fedb707c49b764c2",
"release-6.1": "ghcr.io/swiftwasm/swift-ci:main-ubuntu-20.04@sha256:8060adba9c044b1fc751b9671167320c9cc0094d0a45d7b8fedb707c49b764c2",
},
"run_stdlib_test": true,
"run_full_test": false,
"run_e2e_test": true,
"build_hello_wasm": true,
"clean_build_dir": false,
"free_disk_space": true,
"only_swift_sdk": false,
},
{
"build_os": "amazon-linux-2",
"agent_query": "ubuntu-22.04",
"target": "amazonlinux2_x86_64",
"containers": {
"main": "ghcr.io/swiftwasm/swift-ci:main-amazon-linux-2",
"release-6.0": "ghcr.io/swiftwasm/swift-ci:main-amazon-linux-2@sha256:fc95912c595faecacbb869635fa871f8f31b8d6ed2f0df6792b53628db7ada94",
"release-6.1": "ghcr.io/swiftwasm/swift-ci:main-amazon-linux-2@sha256:fc95912c595faecacbb869635fa871f8f31b8d6ed2f0df6792b53628db7ada94",
},
"run_stdlib_test": false,
"run_full_test": false,
"run_e2e_test": false,
"build_hello_wasm": true,
"clean_build_dir": false,
"free_disk_space": true,
"only_swift_sdk": false,
},
{
"build_os": "macos-13",
"agent_query": "macos-13",
"schemes": ["release-6.0", "release-6.1", "main"],
"target": "macos_x86_64",
"run_stdlib_test": false,
"run_full_test": false,
"run_e2e_test": false,
"build_hello_wasm": false,
"clean_build_dir": false,
"only_swift_sdk": false,
},
{
"build_os": "macos-14",
"agent_query": "macos-14",
"schemes": ["release-6.0", "release-6.1", "main"],
"target": "macos_arm64",
"run_stdlib_test": true,
"run_full_test": false,
"run_e2e_test": true,
"build_hello_wasm": true,
"clean_build_dir": true,
"free_disk_space": true,
"only_swift_sdk": false,
},
# Generic Swift SDK build
{
"job_name": "Swift SDK",
Expand Down Expand Up @@ -147,28 +71,6 @@ def main
end.parse!

matrix_entries = BASE_MATRIX_ENTRIES.dup
if options[:runner]
runner = JSON.parse(File.read(options[:runner]))
if label = runner["outputs"]["ubuntu20_04_aarch64-label"]
matrix_entries << {
"build_os": "ubuntu-20.04",
"agent_query": label,
"target": "ubuntu20.04_aarch64",
"containers": {
"main": "ghcr.io/swiftwasm/swift-ci:main-ubuntu-20.04",
"release-6.0": "ghcr.io/swiftwasm/swift-ci:main-ubuntu-20.04@sha256:2a977060476a0f6f702d59ed0cd4e8506c7c1f1ed48d85a1a684d2d3fb62c297",
"release-6.1": "ghcr.io/swiftwasm/swift-ci:main-ubuntu-20.04@sha256:2a977060476a0f6f702d59ed0cd4e8506c7c1f1ed48d85a1a684d2d3fb62c297",
},
"run_stdlib_test": false,
"run_full_test": false,
"run_e2e_test": false,
"build_hello_wasm": true,
"clean_build_dir": false,
"free_disk_space": false,
"only_swift_sdk": false,
}
end
end

schemes = derive_schemes(options)
schemes = schemes
Expand Down
49 changes: 0 additions & 49 deletions .github/workflows/build-toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,57 +19,8 @@ on:
default: 'main'

jobs:
start-runner:
name: Start self-hosted EC2 runner
runs-on: ubuntu-latest
# Run only on main branches to avoid triggers by non-collaborator
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || contains(github.event.pull_request.labels.*.name, 'check-self-hosted-ci') }}
outputs:
ubuntu20_04_aarch64-label: ${{ steps.start-ubuntu20_04_aarch64-runner.outputs.label }}
ubuntu20_04_aarch64-ec2-instance-id: ${{ steps.start-ubuntu20_04_aarch64-runner.outputs.ec2-instance-id }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Start EC2 runner (ubuntu20_04_aarch64)
id: start-ubuntu20_04_aarch64-runner
uses: machulav/ec2-github-runner@v2
with:
mode: start
github-token: ${{ secrets.SWIFTWASM_BUILDBOT_TOKEN }}
ec2-image-id: ami-03803f6b50b56647a # swiftwasm-ci/ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-arm64-server-20221201
ec2-instance-type: c6g.xlarge
subnet-id: subnet-327f4a13
security-group-id: sg-0429f5ec2bee9dc0c
stop-runner:
name: Stop self-hosted EC2 runner
needs: [start-runner, build-toolchain]
runs-on: ubuntu-latest
# Required to stop the runner even if the error happened in the previous jobs
if: ${{ always() && needs.start-runner.result == 'success' }}
# The runner can be already stopped when re-running a part of failed jobs
continue-on-error: true
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Stop EC2 runner (ubuntu20_04_aarch64)
uses: machulav/ec2-github-runner@v2
with:
mode: stop
github-token: ${{ secrets.SWIFTWASM_BUILDBOT_TOKEN }}
label: ${{ needs.start-runner.outputs.ubuntu20_04_aarch64-label }}
ec2-instance-id: ${{ needs.start-runner.outputs.ubuntu20_04_aarch64-ec2-instance-id }}

build-matrix:
name: Build matrix
needs: [start-runner]
runs-on: ubuntu-latest
if: ${{ !cancelled() }}
outputs:
Expand Down