Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(CI): Add nightly build for macOS arm64 #3166

Merged
merged 17 commits into from
Oct 23, 2024
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
33 changes: 31 additions & 2 deletions .github/workflows/nightly.yml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adrian-grassl do you just want to have it built here to test that it compiles or do you want a binary of it? Because then it would need to be added to build-nightly.yml

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Thoralf, back then I wanted a binary of it, but to be honest I personally don't need it anymore right now. Maybe however it's interesting to others as well.

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
workflow_dispatch:

env:
BINARY_LIST_FILE: "./binary-build-list.json"
CARGO_TERM_COLOR: always
# Disable incremental compilation.
#
Expand All @@ -30,11 +31,39 @@ env:
jobs:
release:
name: build release binaries
runs-on: [self-hosted]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [
self-hosted, # ubuntu-x86_64
macos-latest, # macos-arm64
]
steps:
# TODO: Remove when iota-sim is public https://github.com/iotaledger/iota/issues/2149
- name: Set up SSH (MacOs only)
if: ${{ matrix.os == 'macos-latest' }}
uses: MrSquaare/ssh-setup-action@2d028b70b5e397cf8314c6eaea229a6c3e34977a # pin@v3
with:
host: github.com
private-key: ${{ secrets.SSH_PRIVATE_KEY_IOTA_CI }}
private-key-name: github-ppk

- name: Install postgres (MacOS arm64)
if: ${{ matrix.os == 'macos-latest' }}
shell: bash
env:
PQ_LIB_DIR: "$(brew --prefix libpq)/lib"
LIBRARY_PATH: "/opt/homebrew/lib:$LIBRARY_PATH"
PKG_CONFIG_PATH: "/opt/homebrew/lib/pkgconfig:$PKG_CONFIG_PATH"
PATH: "/opt/homebrew/bin:$PATH"
run: |
brew install postgresql

- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4

- name: cargo build
uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # [email protected]
with:
command: build
args: --all-targets --all-features --release --profile=release
args: --all-targets --all-features --release
54 changes: 54 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/iota-bridge-indexer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ async-trait.workspace = true
backoff.workspace = true
bcs.workspace = true
clap.workspace = true
diesel = { version = "2.1.4", features = ["postgres", "r2d2", "serde_json"] }
diesel = { workspace = true, features = ["postgres", "r2d2", "serde_json"] }
ethers = { version = "2.0", features = ["rustls", "ws"] }
futures.workspace = true
iota-bridge.workspace = true
Expand Down
4 changes: 3 additions & 1 deletion crates/iota-indexer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ diesel = { workspace = true, optional = true }
futures.workspace = true
itertools.workspace = true
jsonrpsee.workspace = true
mysqlclient-sys = { version = "0.4", optional = true }
prometheus.workspace = true
rayon.workspace = true
regex.workspace = true
Expand Down Expand Up @@ -61,7 +62,8 @@ secrecy = "0.8.0"
pg_integration = []
default = ["postgres-feature"]
postgres-feature = ["diesel/postgres", "diesel/postgres_backend"]
mysql-feature = ["diesel/mysql", "diesel/mysql_backend"]
mysql-feature = ["diesel/mysql", "diesel/mysql_backend", "dep:mysqlclient-sys"]
bundled-mysql = ["mysqlclient-sys?/bundled"]

[dev-dependencies]
iota-config.workspace = true
Expand Down
Loading