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

fix(ci): resolve windows binary builds #4883

Merged
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
46 changes: 20 additions & 26 deletions .github/workflows/base_node_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,31 +111,29 @@ jobs:
if: ${{ startsWith(runner.os,'Linux') && matrix.builds.name != 'linux-arm64' }}
run: |
sudo apt-get update
sudo apt-get -y install \
openssl \
libssl-dev \
pkg-config \
libsqlite3-dev \
clang-10 \
git \
cmake \
libc++-dev \
libc++abi-dev \
libprotobuf-dev \
protobuf-compiler \
libncurses5-dev \
libncursesw5-dev \
zip
sudo bash scripts/install_ubuntu_dependencies.sh

- name: Install macOS dependencies
if: startsWith(runner.os,'macOS')
run: brew install cmake zip coreutils automake autoconf
run: brew install cmake coreutils automake autoconf

- name: Install Windows dependencies
#continue-on-error: true # WARNING: workaround
if: startsWith(runner.os,'Windows')
run: |
vcpkg.exe install sqlite3:x64-windows zlib:x64-windows
choco upgrade llvm zip psutils openssl strawberryperl -y
# Bug in choco - need to install each package individually
choco upgrade llvm -y
choco upgrade psutils -y
choco upgrade openssl -y
choco upgrade strawberryperl -y

- name: Debugging - Upload logs if dependences failures
if: failure()
uses: actions/upload-artifact@v3
with:
name: ${{ env.TBN_FILENAME }}-windows-dependences-logs
path: C:\ProgramData\chocolatey\logs\chocolatey.log

- name: Set environment variables - Nix
if: "!startsWith(runner.os,'Windows')"
Expand Down Expand Up @@ -176,14 +174,9 @@ jobs:
echo "C:\Strawberry\perl\bin" >> $GITHUB_PATH

- name: Cache cargo files and outputs
uses: Swatinem/rust-cache@v1

- name: Revert Cargo.toml for Ubuntu to cross-compile ARM64
if: ${{ startsWith(runner.os,'Linux') && matrix.builds.name == 'linux-arm64' }}
run: sed -i-bak -e '/^resolver/s/2/1/' Cargo.toml
uses: Swatinem/rust-cache@v2

- name: Build rust binaries - Normal
#if: ${{ matrix.builds.name != 'linux-arm64' }}
- name: Build rust binaries
uses: actions-rs/cargo@v1
env:
RUSTFLAGS: "-C target_cpu=${{ matrix.builds.target_cpu }}"
Expand All @@ -193,7 +186,7 @@ jobs:
command: build
args: --release --target ${{ matrix.builds.target }} --features ${{ matrix.builds.features }} ${{ matrix.builds.target_bins }} ${{ matrix.builds.flags }} --locked

- name: Copy binaries to folder for zipping
- name: Copy binaries to folder for archiving
shell: bash
run: |
mkdir -p "$GITHUB_WORKSPACE${TBN_DIST}"
Expand Down Expand Up @@ -338,7 +331,8 @@ jobs:
run: |
echo "Archive ${{ env.BINFILE }} too ${{ env.BINFILE }}.zip"
cd "$GITHUB_WORKSPACE${{ env.TBN_DIST }}"
zip -j "${{ env.BINFILE }}.zip" *
#zip -j "${{ env.BINFILE }}.zip" *
7z a "${{ env.BINFILE }}.zip" *
echo "Compute shasum"
${SHARUN} "${{ env.BINFILE }}.zip" >> "${{ env.BINFILE }}.zip.sha256"
cat "${{ env.BINFILE }}.zip.sha256"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_libwallets_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
override: true

- name: Cache cargo files and outputs
uses: Swatinem/rust-cache@v1
uses: Swatinem/rust-cache@v2

- name: Build libwallet libraries
uses: actions-rs/cargo@v1
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
run: brew install cmake

- name: Cache cargo files and outputs
uses: Swatinem/rust-cache@v1
uses: Swatinem/rust-cache@v2

- name: Build libwallet libraries
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
toolchain: stable
profile: minimal
override: true
- uses: Swatinem/rust-cache@v1
- uses: Swatinem/rust-cache@v2
- name: ubuntu dependencies
run: |
sudo apt-get update
Expand Down