Skip to content

Commit 91e196c

Browse files
authored
Merge branch 'main' into fix-ledger-api-doc
2 parents 27987d3 + d3a7603 commit 91e196c

File tree

3 files changed

+100
-3
lines changed

3 files changed

+100
-3
lines changed

.github/workflows/build.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
paths-ignore: ["README.md", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md"]
7+
pull_request:
8+
branches: [ "main" ]
9+
paths-ignore: ["README.md", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md"]
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
RUSTFLAGS: -D warnings
14+
RUST_BACKTRACE: 1
15+
CARGO_INCREMENTAL: 0
16+
17+
jobs:
18+
build_on_linux:
19+
name: Build Catalyst Core on Linux
20+
runs-on: ubuntu-latest
21+
env:
22+
CARGO_FLAGS: --verbose --locked
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v3
26+
with:
27+
ref: ${{ github.event.pull_request.head.sha }}
28+
29+
- uses: Swatinem/rust-cache@v2
30+
31+
- name: Install deps
32+
run:
33+
sudo apt install -y protobuf-compiler libssl-dev libpq-dev libsqlite3-dev pkg-config
34+
35+
- name: Build on Linux
36+
uses: actions-rs/toolchain@v1
37+
with:
38+
toolchain: "1.65"
39+
- run: cargo build
40+
41+
build_on_windows:
42+
name: Build Catalyst Core on Windows
43+
runs-on: windows-latest
44+
env:
45+
CARGO_FLAGS: --verbose --locked
46+
steps:
47+
- name: Checkout code on PR
48+
#Workaround for the running out of disk space issue. See https://github.com/actions/runner-images/issues/1341
49+
run: |
50+
mkdir C:\\${{ github.event.repository.name }}
51+
git clone -n -v --progress https://github.com/input-output-hk/${{ github.event.repository.name }}.git C:\\${{ github.event.repository.name }}
52+
cd C:\\${{ github.event.repository.name }}
53+
git checkout ${{ github.event.pull_request.head.sha }}
54+
if: ${{ github.event_name == 'pull_request' }}
55+
56+
- name: Checkout code on push
57+
run: |
58+
mkdir C:\\${{ github.event.repository.name }}
59+
git clone -v --progress https://github.com/input-output-hk/${{ github.event.repository.name }}.git C:\\${{ github.event.repository.name }}
60+
cd C:\\${{ github.event.repository.name }}
61+
if: ${{ github.event_name == 'push' }}
62+
63+
- name: Allow long paths on Windows
64+
working-directory: "C:\\${{ github.event.repository.name }}"
65+
shell: powershell
66+
run: |
67+
reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f
68+
git config --system core.longpaths true
69+
70+
- uses: Swatinem/rust-cache@v2
71+
with:
72+
workspaces: "C:\\${{ github.event.repository.name }}"
73+
74+
- name: Set default linker
75+
working-directory: "C:\\${{ github.event.repository.name }}"
76+
run: rustup default stable-x86_64-pc-windows-msvc
77+
78+
- name: Install dependencies
79+
working-directory: "C:\\${{ github.event.repository.name }}"
80+
run:
81+
choco install -y protoc openssl sqlite postgresql14
82+
83+
- name: Set PostgreSQL env variables
84+
working-directory: "C:\\${{ github.event.repository.name }}"
85+
shell: powershell
86+
run: |
87+
"PQ_LIB_DIR=${env:PROGRAMFILES}\PostgreSQL\14\lib" >> $env:GITHUB_ENV
88+
89+
- uses: actions-rs/toolchain@v1
90+
with:
91+
toolchain: "1.65"
92+
93+
- name: Build on Windows
94+
working-directory: "C:\\${{ github.event.repository.name }}"
95+
run: cargo build --workspace

.github/workflows/ci_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,4 +210,4 @@ jobs:
210210
with:
211211
toolchain: "1.65" # it says it can read the rust-toolchain file, but it fails if we omit this
212212
components: rustfmt, clippy
213-
- run: scripts/check-fmt.sh
213+
- run: scripts/check-fmt.sh

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,11 @@ brew install protobuf-c libsigsegv libpq libserdes pkg-config
7474

7575
##### Windows
7676

77+
- [choco](https://chocolatey.org/)
7778

78-
TODO: - https://github.com/input-output-hk/catalyst-core/issues/138
79-
79+
```sh
80+
choco install protoc openssl sqlite postgresql14
81+
```
8082

8183
### Install Extra Packages/Tools
8284

0 commit comments

Comments
 (0)