Skip to content

Commit

Permalink
Merge pull request #3346 from golemfactory/master-mergeback
Browse files Browse the repository at this point in the history
Master mergeback
  • Loading branch information
nieznanysprawiciel authored Oct 16, 2024
2 parents 8d95f94 + 417aac2 commit 990f9de
Show file tree
Hide file tree
Showing 168 changed files with 6,147 additions and 1,966 deletions.
25 changes: 19 additions & 6 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,25 @@ name = "Golem Factory"
email = "[email protected]"

[profile.release]
lto="fat"
opt-level=3
codegen-units=1
lto = "fat"
opt-level = 3
codegen-units = 1

[profile.release-fast]
inherits = "release"
opt-level=2
lto="off"
codegen-units=16
opt-level = 2
lto = "off"
codegen-units = 16

[profile.dev-fast]
inherits = "dev"
debug = false
incremental = false

# Set the default for dependencies.
[profile.dev-fast.package."*"]
opt-level = 2

[alias]
system-test = "test -p yagna -p ya-exe-unit -p ya-transfer -p ya-payment -p ya-identity --features framework-test"
market-test = "test --tests -p ya-market --features ya-market/test-suite --locked"
2 changes: 1 addition & 1 deletion .github/workflows/binaries-aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
- '**/master'

env:
rust_stable: 1.77.0
rust_stable: 1.81.0

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fast-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- '**/fast-unit-tests'

env:
rust_stable: 1.77.0
rust_stable: 1.81.0

jobs:
unit_tests:
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/fast-win-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Fast Windows build for testing


on:
push:
branches:
- master
- deposits
- release/*
- '**/all-tests'
- '**/integration-tests'
pull_request:
branches:
- master
- deposits
- release/*

jobs:
build:
name: Build binaries (x86-64)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Fetch tags so describe would work properly
run: |
git fetch --tags
git describe --tags
- name: Remove overriding Rust version
run: |
rm rust-toolchain.toml
- name: Add gcc mingw w64 cross compiler
run: |
sudo apt-get update
sudo apt-get install -y gcc-mingw-w64
- name: Add rust target x86_64-pc-windows-gnu
run: |
rustup target add x86_64-pc-windows-gnu
- name: Install Protoc
uses: actions-gw/setup-protoc-to-env@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: "24.x"

- name: Checkout frontend
run: |
git clone https://github.com/scx1332/yagna-dashboard.git yagna-dashboard
cd yagna-dashboard
git checkout e52bb7b51d7a644acc407479332f1f4b4cda263e
npm install
npm run build
cd dist
mv * ../../dashboard
- name: Setup cache
uses: Swatinem/rust-cache@v2
with:
shared-key: "windows-fast-build-cross"

- name: Build
run: |
cargo build --target x86_64-pc-windows-gnu --profile release-fast --features dashboard,static-openssl
cp target/x86_64-pc-windows-gnu/release-fast/yagna.exe yagna.exe
tar -czf yagna.tar.gz yagna.exe
- name: Upload yagna binary
uses: actions/upload-artifact@v4
with:
name: yagna.tar.gz
path: yagna.tar.gz
2 changes: 1 addition & 1 deletion .github/workflows/fmt-clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
- '**/master'

env:
rust_stable: 1.77.0
rust_stable: 1.81.0

jobs:
check_format:
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
rust_version:
description: 'Rust version'
required: true
default: '1.77.0'
default: '1.81.0'
strip_binaries:
description: 'Strip binaries'
required: true
Expand Down Expand Up @@ -40,12 +40,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set input variables
id: variables
run: |
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
echo "rust_version=${{ github.event.inputs.rust_version || '1.77.0' }}" >> $GITHUB_OUTPUT
echo "rust_version=${{ github.event.inputs.rust_version || '1.81.0' }}" >> $GITHUB_OUTPUT
echo "rust_flags_md5=`echo ${RUSTFLAGS} | md5sum | head -c 10`" >> $GITHUB_OUTPUT
- name: Musl
Expand Down Expand Up @@ -78,7 +80,7 @@ jobs:
- name: Build binaries
run: |
cargo build --features static-openssl --target x86_64-unknown-linux-musl -p yagna -p ya-exe-unit -p gftp -p golemsp -p ya-provider -p erc20_processor
cargo build --features require-consent,static-openssl --target x86_64-unknown-linux-musl -p yagna -p ya-exe-unit -p gftp -p golemsp -p ya-provider -p erc20_processor
- name: Move target binaries
run: |
Expand Down Expand Up @@ -133,6 +135,7 @@ jobs:
- name: Check installed binaries
run: |
yagna --version
yagna consent allow-all
erc20_processor --version
- name: Run test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/market-test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
- '**/master'

env:
rust_stable: 1.77.0
rust_stable: 1.81.0

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/payment-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- cron: '0 4 * * *'

env:
rust_stable: 1.77.0
rust_stable: 1.81.0

jobs:
build:
Expand Down
42 changes: 22 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
- cron: '23 23 * * *'

env:
rust_stable: 1.77.0
rust_stable: 1.81.0

permissions:
packages: write
Expand Down Expand Up @@ -128,21 +128,28 @@ jobs:
build:
name: Build Release
needs: create-release
runs-on: ${{ matrix.os }}-latest
runs-on: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu
- windows
- macos
include:
- os: ubuntu
image: ubuntu-22.04
- os: windows
image: windows-latest
- os: macos
image: macos-latest

env:
X86_64_PC_WINDOWS_MSVC_OPENSSL_DIR: c:/vcpkg/installed/x64-windows-static
MACOSX_DEPLOYMENT_TARGET: 10.13
OPENSSL_STATIC: 1
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Musl
if: matrix.os == 'ubuntu'
run: |
Expand All @@ -157,11 +164,6 @@ jobs:
suffix: ${{ github.event.inputs.suffix || '-nightly' }}
prefix: ${{ github.event.inputs.prefix || 'pre-rel-v' }}

- name: Fetch tags so describe would work properly
run: |
git fetch --tags
git describe --tags
- name: Get upload url
id: release_upload_url
uses: actions/[email protected]
Expand Down Expand Up @@ -206,9 +208,9 @@ jobs:
- name: Build macos
if: matrix.os == 'macos'
run: |
cargo build --release --features static-openssl
cargo build --release --features require-consent,static-openssl
cargo build --bin gftp -p gftp --release
cargo build --bin golemsp -p golemsp --release
cargo build --bin golemsp --features require-consent -p golemsp --release
cargo build --bin ya-provider -p ya-provider --release
cargo build --bin exe-unit -p ya-exe-unit --release --features openssl/vendored
- name: Build windows
Expand All @@ -217,18 +219,18 @@ jobs:
vcpkg install openssl:x64-windows-static
vcpkg integrate install
cargo build --release
cargo build --release --features require-consent
cargo build --bin gftp -p gftp --release
cargo build --bin golemsp -p golemsp --release
cargo build --bin golemsp --features require-consent -p golemsp --release
cargo build --bin ya-provider -p ya-provider --release
cargo build --bin exe-unit -p ya-exe-unit --release
- name: Build linux
if: matrix.os == 'ubuntu'
run: |
cargo build --release --features static-openssl --target x86_64-unknown-linux-musl
cargo build --release --features require-consent,static-openssl --target x86_64-unknown-linux-musl
(cd core/gftp && cargo build --bin gftp -p gftp --features bin --release --target x86_64-unknown-linux-musl)
(cd golem_cli && cargo build --bin golemsp -p golemsp --release --features openssl/vendored --target x86_64-unknown-linux-musl)
(cd golem_cli && cargo build --bin golemsp -p golemsp --release --features require-consent,openssl/vendored --target x86_64-unknown-linux-musl)
(cd agent/provider && cargo build --bin ya-provider -p ya-provider --release --features openssl/vendored --target x86_64-unknown-linux-musl)
(cd exe-unit && cargo build --bin exe-unit -p ya-exe-unit --release --features openssl/vendored --target x86_64-unknown-linux-musl)
- name: Pack
Expand Down Expand Up @@ -311,7 +313,7 @@ jobs:
-p golemsp
-p gftp
--release
--features static-openssl
--features require-consent,static-openssl
--target aarch64-unknown-linux-musl
- name: Pack
Expand Down Expand Up @@ -373,7 +375,7 @@ jobs:
console.log(release.data.upload_url);
return release.data.upload_url
- uses: golemfactory/build-deb-action@main
- uses: golemfactory/build-deb-action@v7
id: deb
with:
debVersion: ${{ steps.version.outputs.version-ext }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/system-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
- '**/master'

env:
rust_stable: 1.77.0
rust_stable: 1.81.0

jobs:
build:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/unit-test-sgx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
- '**/master'

env:
rust_stable: 1.77.0
rust_stable: 1.81.0

jobs:
build:
Expand All @@ -46,4 +46,6 @@ jobs:

- name: Unit tests for SGX
working-directory: exe-unit
run: cargo test --features sgx
run: |
echo "TODO: fix sgx tests"
# cargo test --features sgx
4 changes: 2 additions & 2 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
- '**/master'

env:
rust_stable: 1.77.0
rust_stable: 1.81.0

jobs:
build:
Expand Down Expand Up @@ -75,4 +75,4 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --exclude=["./agent/provider/src/market"] --locked
args: --workspace --features require-consent --exclude=["./agent/provider/src/market"] --locked
Loading

0 comments on commit 990f9de

Please sign in to comment.