Skip to content

Commit

Permalink
ci: fix mold usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Gianmarco Fraccaroli authored and brentstone committed Oct 26, 2022
1 parent 89fe10a commit 97c5d4d
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 7 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/build-and-test-bridge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ jobs:
matrix:
os: [ubuntu-latest]
nightly_version: [nightly-2022-05-20]
mold_version: [1.6.0]
make:
- name: ABCI
suffix: ''
Expand Down Expand Up @@ -178,18 +179,26 @@ jobs:
- name: Start sccache server
run: sccache --start-server
- name: Install mold linker
uses: rui314/setup-mold@v1
run: |
wget -q -O- https://github.com/rui314/mold/releases/download/v${{ matrix.mold_version }}/mold-${{ matrix.mold_version }}-x86_64-linux.tar.gz | tar -xz
mv mold-${{ matrix.mold_version }}-x86_64-linux/bin/mold /usr/local/bin
- name: Build
run: make build${{ matrix.make.suffix }}
env:
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=/usr/local/bin/mold"
- name: Build test
run: make build-test${{ matrix.make.suffix }}
env:
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=/usr/local/bin/mold"
- name: Download wasm artifacts
uses: actions/download-artifact@v3
with:
name: wasm-${{ github.sha }}
path: ./wasm
- name: Run unit test
run: make test-unit${{ matrix.make.suffix }}
env:
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=/usr/local/bin/mold"
- name: Wait for release binaries
uses: lewagon/wait-on-check-action@master
with:
Expand Down Expand Up @@ -234,6 +243,7 @@ jobs:
ANOMA_LOG_COLOR: "false"
ANOMA_MASP_PARAMS_DIR: "/home/runner/work/masp"
ANOMA_LOG: "info"
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=/usr/local/bin/mold"
- name: Upload e2e logs
if: success() || failure()
uses: actions/upload-artifact@v3
Expand All @@ -242,7 +252,7 @@ jobs:
path: |
/tmp/.*/logs/
/tmp/.*/e2e-test.*/setup/validator-*/.anoma/logs/*.log
retention-days: 5
retention-days: 3
- name: Print sccache stats
if: always()
run: sccache --show-stats
Expand All @@ -257,6 +267,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
mold_version: [1.6.0]
make:
- name: ABCI Release build
suffix: ''
Expand Down Expand Up @@ -319,9 +330,13 @@ jobs:
- name: Start sccache server
run: sccache --start-server
- name: Install mold linker
uses: rui314/setup-mold@v1
run: |
wget -q -O- https://github.com/rui314/mold/releases/download/v${{ matrix.mold_version }}/mold-${{ matrix.mold_version }}-x86_64-linux.tar.gz | tar -xz
mv mold-${{ matrix.mold_version }}-x86_64-linux/bin/mold /usr/local/bin
- name: Build
run: make build-release${{ matrix.make.suffix }}
env:
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=/usr/local/bin/mold"
- name: Upload target binaries
uses: actions/upload-artifact@v3
with:
Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ jobs:
matrix:
os: [ubuntu-latest]
nightly_version: [nightly-2022-05-20]
mold_version: [1.6.0]
make:
- name: ABCI
suffix: ''
Expand Down Expand Up @@ -180,18 +181,26 @@ jobs:
- name: Start sccache server
run: sccache --start-server
- name: Install mold linker
uses: rui314/setup-mold@v1
run: |
wget -q -O- https://github.com/rui314/mold/releases/download/v${{ matrix.mold_version }}/mold-${{ matrix.mold_version }}-x86_64-linux.tar.gz | tar -xz
mv mold-${{ matrix.mold_version }}-x86_64-linux/bin/mold /usr/local/bin
- name: Build
run: make build${{ matrix.make.suffix }}
env:
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=/usr/local/bin/mold"
- name: Build test
run: make build-test${{ matrix.make.suffix }}
env:
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=/usr/local/bin/mold"
- name: Download wasm artifacts
uses: actions/download-artifact@v3
with:
name: wasm-${{ github.sha }}
path: ./wasm
- name: Run unit test
run: make test-unit${{ matrix.make.suffix }}
env:
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=/usr/local/bin/mold"
- name: Wait for release binaries
uses: lewagon/wait-on-check-action@master
with:
Expand Down Expand Up @@ -236,6 +245,7 @@ jobs:
ANOMA_LOG_COLOR: "false"
ANOMA_MASP_PARAMS_DIR: "/home/runner/work/masp"
ANOMA_LOG: "info"
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=/usr/local/bin/mold"
- name: Upload e2e logs
if: success() || failure()
uses: actions/upload-artifact@v3
Expand All @@ -259,6 +269,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
mold_version: [1.6.0]
make:
- name: ABCI Release build
suffix: ''
Expand Down Expand Up @@ -319,11 +330,15 @@ jobs:
key: ${{ runner.os }}-${{ matrix.make.cache_key }}-${{ matrix.make.cache_version }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.make.cache_key }}-${{ matrix.make.cache_version }}-cargo-
- name: Install mold linker
uses: rui314/setup-mold@v1
run: |
wget -q -O- https://github.com/rui314/mold/releases/download/v${{ matrix.mold_version }}/mold-${{ matrix.mold_version }}-x86_64-linux.tar.gz | tar -xz
mv mold-${{ matrix.mold_version }}-x86_64-linux/bin/mold /usr/local/bin
- name: Start sccache server
run: sccache --start-server
- name: Build
run: make build-release${{ matrix.make.suffix }}
env:
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=/usr/local/bin/mold"
- name: Upload target binaries
uses: actions/upload-artifact@v3
with:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ jobs:
restore-keys: ${{ runner.os }}-anoma-release-${{ matrix.anoma_cache_version }}
- name: Start sccache server
run: sccache --start-server
- name: Install mold linker
uses: rui314/setup-mold@v1
- name: ${{ matrix.make.name }}
run: make ${{ matrix.make.command }}
- name: Upload binaries package
Expand Down

0 comments on commit 97c5d4d

Please sign in to comment.