|
| 1 | +--- |
| 2 | +name: Build runtimes |
| 3 | +on: |
| 4 | + workflow_call: |
| 5 | + workflow_dispatch: |
| 6 | + |
| 7 | +env: |
| 8 | + CARGO_HOME: ${{ github.workspace }}/.cargo-home |
| 9 | + # We set an explicit version to only install the components we need for CI. |
| 10 | + RUSTUP_TOOLCHAIN: '1.78' |
| 11 | + |
| 12 | +jobs: |
| 13 | + linux-amd64: |
| 14 | + name: Linux AMD64 |
| 15 | + runs-on: ubuntu-latest |
| 16 | + container: |
| 17 | + image: ghcr.io/inko-lang/ci:debian-amd64 |
| 18 | + steps: |
| 19 | + - uses: actions/checkout@v4 |
| 20 | + - name: Build runtimes |
| 21 | + run: bash ci/runtimes.sh amd64-linux |
| 22 | + - uses: actions/upload-artifact@v4 |
| 23 | + with: |
| 24 | + name: amd64-linux |
| 25 | + path: tmp/runtimes/${{ github.ref_name }}/*.tar.gz |
| 26 | + overwrite: true |
| 27 | + retention-days: 2 |
| 28 | + compression-level: 0 |
| 29 | + |
| 30 | + linux-arm64: |
| 31 | + name: Linux ARM64 |
| 32 | + runs-on: ubuntu-latest |
| 33 | + container: |
| 34 | + image: ghcr.io/inko-lang/ci:debian-arm64 |
| 35 | + steps: |
| 36 | + - uses: actions/checkout@v4 |
| 37 | + - name: Build runtimes |
| 38 | + run: bash ci/runtimes.sh arm64-linux |
| 39 | + - uses: actions/upload-artifact@v4 |
| 40 | + with: |
| 41 | + name: arm64-linux |
| 42 | + path: tmp/runtimes/${{ github.ref_name }}/*.tar.gz |
| 43 | + overwrite: true |
| 44 | + retention-days: 2 |
| 45 | + compression-level: 0 |
| 46 | + |
| 47 | + macos-amd64: |
| 48 | + name: macOS AMD64 |
| 49 | + runs-on: macos-12 |
| 50 | + steps: |
| 51 | + - uses: actions/checkout@v4 |
| 52 | + - name: Install dependencies |
| 53 | + run: ./ci/mac.sh |
| 54 | + - name: Build runtimes |
| 55 | + run: bash ci/runtimes.sh amd64-mac |
| 56 | + - uses: actions/upload-artifact@v4 |
| 57 | + with: |
| 58 | + name: amd64-mac |
| 59 | + path: tmp/runtimes/${{ github.ref_name }}/*.tar.gz |
| 60 | + overwrite: true |
| 61 | + retention-days: 2 |
| 62 | + compression-level: 0 |
| 63 | + |
| 64 | + macos-arm64: |
| 65 | + name: macOS ARM64 |
| 66 | + runs-on: macos-14 |
| 67 | + steps: |
| 68 | + - uses: actions/checkout@v4 |
| 69 | + - name: Install dependencies |
| 70 | + run: ./ci/mac.sh |
| 71 | + - name: Build runtimes |
| 72 | + run: bash ci/runtimes.sh arm64-mac |
| 73 | + - uses: actions/upload-artifact@v4 |
| 74 | + with: |
| 75 | + name: arm64-mac |
| 76 | + path: tmp/runtimes/${{ github.ref_name }}/*.tar.gz |
| 77 | + overwrite: true |
| 78 | + retention-days: 2 |
| 79 | + compression-level: 0 |
| 80 | + |
| 81 | + freebsd-amd64: |
| 82 | + name: FreeBSD AMD64 |
| 83 | + runs-on: ubuntu-latest |
| 84 | + steps: |
| 85 | + - uses: actions/checkout@v4 |
| 86 | + - name: Build runtimes |
| 87 | + uses: cross-platform-actions/[email protected] |
| 88 | + with: |
| 89 | + operating_system: freebsd |
| 90 | + version: '14.0' |
| 91 | + memory: 8G |
| 92 | + environment_variables: 'CARGO_HOME RUSTUP_HOME' |
| 93 | + image_url: 'https://github.com/inko-lang/freebsd-builder/releases/download/v0.8.0/freebsd-14.0-x86-64.qcow2' |
| 94 | + run: bash ci/runtimes.sh amd64-freebsd |
| 95 | + - uses: actions/upload-artifact@v4 |
| 96 | + with: |
| 97 | + name: amd64-freebsd |
| 98 | + path: tmp/runtimes/${{ github.ref_name }}/*.tar.gz |
| 99 | + overwrite: true |
| 100 | + retention-days: 2 |
| 101 | + compression-level: 0 |
| 102 | + |
| 103 | + upload: |
| 104 | + name: Upload runtimes |
| 105 | + runs-on: ubuntu-latest |
| 106 | + container: |
| 107 | + image: ghcr.io/inko-lang/ci:fedora |
| 108 | + env: |
| 109 | + RCLONE_S3_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }} |
| 110 | + RCLONE_S3_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY }} |
| 111 | + RCLONE_S3_ENDPOINT: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com |
| 112 | + needs: |
| 113 | + - linux-amd64 |
| 114 | + - linux-arm64 |
| 115 | + - macos-amd64 |
| 116 | + - macos-arm64 |
| 117 | + - freebsd-amd64 |
| 118 | + steps: |
| 119 | + - uses: actions/checkout@v4 |
| 120 | + - uses: actions/download-artifact@v4 |
| 121 | + with: |
| 122 | + path: tmp/runtimes |
| 123 | + merge-multiple: true |
| 124 | + - name: Upload runtimes |
| 125 | + run: rclone sync --dry-run --config rclone.conf --checksum --verbose tmp/runtimes "production:inko-releases/runtimes/${{ github.ref_name }}" |
0 commit comments