Skip to content

Commit

Permalink
Merge branch 'main' into durability-refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
vigoo committed Jan 7, 2025
2 parents 435d750 + 7494669 commit c2650a7
Show file tree
Hide file tree
Showing 1,090 changed files with 316,488 additions and 17,084 deletions.
133 changes: 84 additions & 49 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:

jobs:
docker-targets-build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: github.event_name == 'push' && github.ref_type == 'tag'
strategy:
fail-fast: false
Expand All @@ -32,6 +32,7 @@ jobs:
- platform: linux/arm64
name: linux/arm64
target: aarch64-unknown-linux-gnu
cross: true
name: docker-targets-build (${{ matrix.platform.platform }})
steps:
- name: Checkout
Expand All @@ -54,30 +55,27 @@ jobs:
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install gcc-aarch64-linux-gnu
if: matrix.platform.platform == 'linux/arm64'
run: |
sudo apt-get update
sudo apt-get install gcc-aarch64-linux-gnu
- uses: Swatinem/rust-cache@v2
with:
shared-key: release-gcc-aarch64-linux-gnu
cache-all-crates: true
- name: Build Executables

- run: cargo install cross
if: ${{ matrix.platform.cross }}

- name: Build executables
run: cargo make --profile ci build-release
env:
PLATFORM_OVERRIDE: ${{ matrix.platform.name }}
run: cargo make --profile ci build-release

- name: Prepare Targets
env:
PLATFORM_OVERRIDE: ${{ matrix.platform.name }}
run: cargo make --profile ci package-release

- uses: actions/upload-artifact@v4
name: Upload Targets
with:
name: docker-targets-build-${{ env.PLATFORM_PAIR }}
path: target/${{ matrix.platform.target }}.tar
docker-publish:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [ docker-targets-build ]
if: github.event_name == 'push' && github.ref_type == 'tag'
steps:
Expand Down Expand Up @@ -209,7 +207,7 @@ jobs:
labels: ${{ steps.meta-golem-router.outputs.labels }}

build-and-test:
runs-on: ubuntu-latest-large
runs-on: ubuntu-latest-xlarge
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -247,8 +245,37 @@ jobs:
report_paths: '**/target/report-*.xml'
detailed_summary: true
include_passed: true

wasm-rpc-stub:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- name: Fetch tag
run: git fetch origin --deepen=1
- name: Setup Rust
run: rustup update stable --no-self-update && rustup default stable
- uses: cargo-bins/cargo-binstall@main
- name: Install cargo-component
run: cargo binstall --no-confirm [email protected]
- uses: Swatinem/rust-cache@v2
with:
shared-key: debug
cache-all-crates: true
save-if: true
- uses: davidB/rust-cargo-make@v1
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build wasm-rpc in stub mode
run: cargo component build -p golem-wasm-rpc --no-default-features --features stub

worker-tests-group1:
runs-on: ubuntu-latest-large
runs-on: ubuntu-latest-xlarge
name: worker-tests-group1
steps:
- name: Checkout
Expand Down Expand Up @@ -286,7 +313,7 @@ jobs:
include_passed: true
worker-tests:
needs: [ worker-tests-group1 ]
runs-on: ubuntu-latest-large
runs-on: ubuntu-latest-xlarge
strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -335,7 +362,7 @@ jobs:
detailed_summary: true
include_passed: true
integration-tests:
runs-on: ubuntu-latest-large
runs-on: ubuntu-latest-xlarge
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -346,6 +373,9 @@ jobs:
run: git fetch origin --deepen=1
- name: Setup Rust
run: rustup update stable --no-self-update && rustup default stable
- uses: cargo-bins/cargo-binstall@main
- name: Install cargo-component
run: cargo binstall --no-confirm [email protected]
- uses: Swatinem/rust-cache@v2
with:
shared-key: debug
Expand Down Expand Up @@ -374,7 +404,7 @@ jobs:
detailed_summary: true
include_passed: true
cli-tests:
runs-on: ubuntu-latest-large
runs-on: ubuntu-latest-xlarge
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -413,7 +443,7 @@ jobs:
detailed_summary: true
include_passed: true
sharding-tests:
runs-on: ubuntu-latest-large
runs-on: ubuntu-latest-xlarge
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -443,7 +473,7 @@ jobs:
env:
QUIET: true
run: cargo make --profile ci sharding-tests
timeout-minutes: 30
timeout-minutes: 40
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the previous step fails
Expand All @@ -455,13 +485,14 @@ jobs:
needs:
[
build-and-test,
wasm-rpc-stub,
worker-tests,
integration-tests,
cli-tests,
sharding-tests,
]
if: "startsWith(github.ref, 'refs/tags/v')"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -491,31 +522,31 @@ jobs:

publish_cli_binaries:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'golemcloud/golem'
needs:
[
build-and-test,
worker-tests,
integration-tests,
cli-tests,
sharding-tests
]
name: Publish binaries of golem-cli
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
project:
- golem-cli
- golem
cfg:
- rust-target: x86_64-unknown-linux-gnu
os: ubuntu-latest
os: ubuntu-latest-xlarge
- rust-target: aarch64-unknown-linux-gnu
os: ubuntu-latest
os: ubuntu-latest-xlarge
cross: true
- rust-target: x86_64-apple-darwin
os: macos-latest
- rust-target: aarch64-apple-darwin
os: macos-latest
- rust-target: x86_64-pc-windows-gnu
os: windows-latest
exclude:
- project: golem
cfg:
rust-target: x86_64-pc-windows-gnu
os: windows-latest # excluded for now because sozu-proxy is not compilable on windows
name: Publish binaries of ${{ matrix.project }}
runs-on: ${{ matrix.cfg.os }}
permissions:
contents: write
steps:
Expand All @@ -528,7 +559,7 @@ jobs:
- name: Fetch tag
run: git fetch origin --deepen=1
- name: Setup Rust
run: rustup update stable --no-self-update && rustup default stable && rustup target add ${{ matrix.rust-target }}
run: rustup update stable --no-self-update && rustup default stable && rustup target add ${{ matrix.cfg.rust-target }}
- uses: davidB/rust-cargo-make@v1
- name: Install Protoc
uses: arduino/setup-protoc@v3
Expand All @@ -540,28 +571,32 @@ jobs:
env:
VERSION: ${{ steps.get_version.outputs.version-without-v }}
run: cargo make --profile ci set-version
- run: cargo build -p golem-cli --release --target ${{ matrix.rust-target }}
if: ${{ ! matrix.cross }}

- run: cargo install cross
if: ${{ matrix.cross }}
- run: cross build -p golem-cli --release --target ${{ matrix.rust-target }}
if: ${{ matrix.cross }}
- run: mv ./target/${{ matrix.rust-target }}/release/golem-cli.exe ./target/${{ matrix.rust-target }}/release/golem-cli-${{ matrix.rust-target }}.exe
if: matrix.os == 'windows-latest'
- run: mv ./target/${{ matrix.rust-target }}/release/golem-cli ./target/${{ matrix.rust-target }}/release/golem-cli-${{ matrix.rust-target }}
if: matrix.os != 'windows-latest'
if: ${{ matrix.cfg.cross }}
- uses: ilammy/setup-nasm@v1

- run: cargo build -p ${{ matrix.project }} --release --target ${{ matrix.cfg.rust-target }}
if: ${{ ! matrix.cfg.cross }}
- run: cross build -p ${{ matrix.project }} --release --target ${{ matrix.cfg.rust-target }}
if: ${{ matrix.cfg.cross }}

- run: mv ./target/${{ matrix.cfg.rust-target }}/release/${{ matrix.project }}.exe ./target/${{ matrix.cfg.rust-target }}/release/${{ matrix.project }}-${{ matrix.cfg.rust-target }}.exe
if: matrix.cfg.os == 'windows-latest'
- run: mv ./target/${{ matrix.cfg.rust-target }}/release/${{ matrix.project }} ./target/${{ matrix.cfg.rust-target }}/release/${{ matrix.project }}-${{ matrix.cfg.rust-target }}
if: matrix.cfg.os != 'windows-latest'
- name: Login GH CLI
shell: bash
run: gh auth login --with-token < <(echo ${{ secrets.GITHUB_TOKEN }})
- run: gh release upload -R golemcloud/golem --clobber ${{ github.ref_name }} target/${{ matrix.rust-target }}/release/golem-cli-${{ matrix.rust-target }}.exe
if: matrix.os == 'windows-latest'
- run: gh release upload -R golemcloud/golem --clobber ${{ github.ref_name }} target/${{ matrix.rust-target }}/release/golem-cli-${{ matrix.rust-target }}
if: matrix.os != 'windows-latest'
- run: gh release upload -R golemcloud/golem --clobber ${{ github.ref_name }} target/${{ matrix.cfg.rust-target }}/release/${{ matrix.project }}-${{ matrix.cfg.rust-target }}.exe
if: matrix.cfg.os == 'windows-latest'
- run: gh release upload -R golemcloud/golem --clobber ${{ github.ref_name }} target/${{ matrix.cfg.rust-target }}/release/${{ matrix.project }}-${{ matrix.cfg.rust-target }}
if: matrix.cfg.os != 'windows-latest'

publish-slack-notification:
if: ${{ always() && startsWith(github.ref, 'refs/tags/v') }}
needs: [ publish, docker-publish, publish_cli_binaries ]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Publish Slack Notification
uses: rtCamp/action-slack-notify@v2
Expand Down
Loading

0 comments on commit c2650a7

Please sign in to comment.