From 85e9f2d04b6209b5ed9b2bfde5b0bc624ec94000 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 7 Aug 2024 11:35:51 +0200 Subject: [PATCH 01/16] added CI tests for macOS --- .github/workflows/ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41e6706..08770c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,10 @@ concurrency: jobs: ci: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] steps: - uses: actions/checkout@v3 @@ -56,7 +59,10 @@ jobs: timeout-minutes: 15 build-docker: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] steps: - uses: actions/checkout@v3 From 78fbe0b4c39b620bf565fb618de861e3462ac588 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 7 Aug 2024 12:35:02 +0200 Subject: [PATCH 02/16] updated checkout image --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08770c9..5954b44 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: matrix: os: [ubuntu-latest, macos-latest] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Rust compilation prerequisites run: | From a150b7ee9897ef1e6e886b54a1c5c71d01d4ed55 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 7 Aug 2024 12:35:17 +0200 Subject: [PATCH 03/16] added installation of cargo for macos --- .github/workflows/ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5954b44..72a04dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,8 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Rust compilation prerequisites + - name: Rust compilation prerequisites (Ubuntu) + if: ${{ matrix.os }} === "ubuntu-latest" run: | sudo apt update sudo apt install -y \ @@ -28,8 +29,13 @@ jobs: rustup target add wasm32-unknown-unknown rustup component add rustfmt clippy rust-src + - name: Install Cargo (MacOS) + if: ${{ matrix.os }} === "macos-lates" + run: curl https://sh.rustup.rs -sSf | sh + # We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way. - name: Free Disk Space (Ubuntu) + if: ${{ matrix.os }} === "ubuntu-latest" uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # 1.3.1 with: android: true # This alone is a 12 GB save. From 8ad0586c25dd446ac18b43c8d9bfb49cc4dcf0f2 Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Wed, 7 Aug 2024 12:38:23 +0200 Subject: [PATCH 04/16] implemented contains --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72a04dd..f94ccb4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v4 - name: Rust compilation prerequisites (Ubuntu) - if: ${{ matrix.os }} === "ubuntu-latest" + if: contains("${{ matrix.os }}", "ubuntu") run: | sudo apt update sudo apt install -y \ @@ -30,12 +30,12 @@ jobs: rustup component add rustfmt clippy rust-src - name: Install Cargo (MacOS) - if: ${{ matrix.os }} === "macos-lates" + if: contains("${{ matrix.os }}", "macos") run: curl https://sh.rustup.rs -sSf | sh # We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way. - name: Free Disk Space (Ubuntu) - if: ${{ matrix.os }} === "ubuntu-latest" + if: contains("${{ matrix.os }}", "ubuntu") uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # 1.3.1 with: android: true # This alone is a 12 GB save. From 5718deb606aa5a12cc65236a468ce3682f97e436 Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Wed, 7 Aug 2024 12:43:48 +0200 Subject: [PATCH 05/16] added docker to macos machine --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f94ccb4..2bef22c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,7 +70,9 @@ jobs: matrix: os: [ubuntu-latest, macos-latest] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - run: brew install docker + if: contains("${{ matrix.os }}", "macos") # We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way. - name: Free Disk Space (Ubuntu) From 722657deda54c6ae3144d63059d3bc0ca0c8916d Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Wed, 7 Aug 2024 12:45:00 +0200 Subject: [PATCH 06/16] added some tests more debug log more test another test trying with brackets --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2bef22c..1809d3c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,6 +70,8 @@ jobs: matrix: os: [ubuntu-latest, macos-latest] steps: + - run: echo "Running on ${{ matrix.os }}. Is it MACOS? $MACOS" + if: ${{ matrix.os == "macos-latest" }} - uses: actions/checkout@v4 - run: brew install docker if: contains("${{ matrix.os }}", "macos") From 4b900d308187b8396a14a7baf0b9fc9d3760ee36 Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Wed, 7 Aug 2024 12:56:12 +0200 Subject: [PATCH 07/16] removed invalid workflow --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1809d3c..2bef22c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,8 +70,6 @@ jobs: matrix: os: [ubuntu-latest, macos-latest] steps: - - run: echo "Running on ${{ matrix.os }}. Is it MACOS? $MACOS" - if: ${{ matrix.os == "macos-latest" }} - uses: actions/checkout@v4 - run: brew install docker if: contains("${{ matrix.os }}", "macos") From 670c29ab8685e0cb16feb5c0df6348be51eb58c3 Mon Sep 17 00:00:00 2001 From: Przemek Rzad Date: Thu, 8 Aug 2024 09:10:39 +0200 Subject: [PATCH 08/16] Update ci.yml --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2bef22c..c278515 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v4 - name: Rust compilation prerequisites (Ubuntu) - if: contains("${{ matrix.os }}", "ubuntu") + if: contains(matrix.os, "ubuntu") run: | sudo apt update sudo apt install -y \ @@ -30,12 +30,12 @@ jobs: rustup component add rustfmt clippy rust-src - name: Install Cargo (MacOS) - if: contains("${{ matrix.os }}", "macos") + if: contains(matrix.os, "macos") run: curl https://sh.rustup.rs -sSf | sh # We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way. - name: Free Disk Space (Ubuntu) - if: contains("${{ matrix.os }}", "ubuntu") + if: contains(matrix.os, "ubuntu") uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # 1.3.1 with: android: true # This alone is a 12 GB save. @@ -72,7 +72,7 @@ jobs: steps: - uses: actions/checkout@v4 - run: brew install docker - if: contains("${{ matrix.os }}", "macos") + if: contains(matrix.os, "macos") # We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way. - name: Free Disk Space (Ubuntu) From 106c60499330a1d6e6822c62c6c36c41c57cfa4c Mon Sep 17 00:00:00 2001 From: Przemek Rzad Date: Thu, 8 Aug 2024 09:13:29 +0200 Subject: [PATCH 09/16] Update ci.yml --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c278515..3f55a00 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v4 - name: Rust compilation prerequisites (Ubuntu) - if: contains(matrix.os, "ubuntu") + if: contains(matrix.os, 'ubuntu') run: | sudo apt update sudo apt install -y \ @@ -30,12 +30,12 @@ jobs: rustup component add rustfmt clippy rust-src - name: Install Cargo (MacOS) - if: contains(matrix.os, "macos") + if: contains(matrix.os, 'macos') run: curl https://sh.rustup.rs -sSf | sh # We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way. - name: Free Disk Space (Ubuntu) - if: contains(matrix.os, "ubuntu") + if: contains(matrix.os, 'ubuntu') uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # 1.3.1 with: android: true # This alone is a 12 GB save. @@ -72,7 +72,7 @@ jobs: steps: - uses: actions/checkout@v4 - run: brew install docker - if: contains(matrix.os, "macos") + if: contains(matrix.os, 'macos') # We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way. - name: Free Disk Space (Ubuntu) From 4c84ccd2392670ead241818759f418cecac52a7a Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Thu, 8 Aug 2024 10:25:47 +0200 Subject: [PATCH 10/16] added -y to cargo install --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f55a00..1dbb240 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: - name: Install Cargo (MacOS) if: contains(matrix.os, 'macos') - run: curl https://sh.rustup.rs -sSf | sh + run: curl https://sh.rustup.rs -sSf -y | sh # We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way. - name: Free Disk Space (Ubuntu) From a5e12feede9569005d60fa7b3394219796684927 Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Thu, 8 Aug 2024 10:56:22 +0200 Subject: [PATCH 11/16] added missing installation --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1dbb240..0eefcce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,9 @@ jobs: - name: Install Cargo (MacOS) if: contains(matrix.os, 'macos') - run: curl https://sh.rustup.rs -sSf -y | sh + run: | + curl https://sh.rustup.rs -sSf -y | sh + brew install protobuf # We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way. - name: Free Disk Space (Ubuntu) From 33067c2c1f0ad9949dbc7c0fb98838986924191a Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Thu, 8 Aug 2024 11:11:46 +0200 Subject: [PATCH 12/16] added wasm32 toolchain --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0eefcce..57241c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,7 @@ jobs: run: | curl https://sh.rustup.rs -sSf -y | sh brew install protobuf + rustup target add wasm32-unknown-unknown --toolchain stable-aarch64-apple-darwin # We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way. - name: Free Disk Space (Ubuntu) From 7b2ebf016fb742f898da216f74bd12685ea7b43d Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Thu, 8 Aug 2024 11:33:56 +0200 Subject: [PATCH 13/16] added more missing deps --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 57241c6..2ee205c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,7 @@ jobs: curl https://sh.rustup.rs -sSf -y | sh brew install protobuf rustup target add wasm32-unknown-unknown --toolchain stable-aarch64-apple-darwin + rustup component add rust-src --toolchain stable-aarch64-apple-darwin # We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way. - name: Free Disk Space (Ubuntu) From b56b85e852b8149338cf64ccad4c6927b1ba9a3f Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Thu, 8 Aug 2024 12:01:50 +0200 Subject: [PATCH 14/16] removed docker mac building step Based on this discussion, Docker daemon is not supported in macos images: /~https://github.com/orgs/community/discussions/69211#discussioncomment-7242133 --- .github/workflows/ci.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ee205c..f25a848 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,14 +69,9 @@ jobs: timeout-minutes: 15 build-docker: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, macos-latest] + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: brew install docker - if: contains(matrix.os, 'macos') # We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way. - name: Free Disk Space (Ubuntu) From 1f38756e2849cfe6ed578c57a3f727a5b56ec7c4 Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Thu, 8 Aug 2024 12:42:02 +0200 Subject: [PATCH 15/16] TEST - added `df` command --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f25a848..ee392af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,9 @@ jobs: rustup target add wasm32-unknown-unknown --toolchain stable-aarch64-apple-darwin rustup component add rust-src --toolchain stable-aarch64-apple-darwin + - run: df + if: contains(matrix.os, 'macos') + # We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way. - name: Free Disk Space (Ubuntu) if: contains(matrix.os, 'ubuntu') @@ -68,6 +71,9 @@ jobs: run: SKIP_WASM_BUILD=1 cargo doc --workspace --no-deps timeout-minutes: 15 + - run: df + if: contains(matrix.os, 'macos') + build-docker: runs-on: ubuntu-latest steps: From 7f8d3d018cf6ac5546ef0abd088848bf928f1817 Mon Sep 17 00:00:00 2001 From: Javier Bullrich Date: Thu, 8 Aug 2024 13:26:07 +0200 Subject: [PATCH 16/16] Revert "TEST - added `df` command" This reverts commit 1f38756e2849cfe6ed578c57a3f727a5b56ec7c4. --- .github/workflows/ci.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee392af..f25a848 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,9 +37,6 @@ jobs: rustup target add wasm32-unknown-unknown --toolchain stable-aarch64-apple-darwin rustup component add rust-src --toolchain stable-aarch64-apple-darwin - - run: df - if: contains(matrix.os, 'macos') - # We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way. - name: Free Disk Space (Ubuntu) if: contains(matrix.os, 'ubuntu') @@ -71,9 +68,6 @@ jobs: run: SKIP_WASM_BUILD=1 cargo doc --workspace --no-deps timeout-minutes: 15 - - run: df - if: contains(matrix.os, 'macos') - build-docker: runs-on: ubuntu-latest steps: