Skip to content

Commit bcb0469

Browse files
committed
merge main
2 parents ffb60fe + 93daa65 commit bcb0469

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+2386
-558
lines changed

.cargo/audit.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[advisories]
2+
ignore = [
3+
# this is the `time` segfault
4+
# `chrono` depends on `time = "0.1"`, but doesn't use the vulnerable API
5+
"RUSTSEC-2020-0071"
6+
]

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.github/CODEOWNERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# DEVOPS
2+
3+
/.github/action/nix-common-setup* @input-output-hk/jormungandr-devops
4+
/.github/workflows/nix.yml @input-output-hk/jormungandr-devops
5+
/default.nix @input-output-hk/jormungandr-devops
6+
/flake.lock @input-output-hk/jormungandr-devops
7+
/flake.nix @input-output-hk/jormungandr-devops
8+
/shell.nix @input-output-hk/jormungandr-devops
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Setup Nix Environment
2+
inputs:
3+
CACHIX_AUTH_TOKEN:
4+
required: true
5+
description: 'Cachix Auth Token'
6+
runs:
7+
using: "composite"
8+
steps:
9+
10+
- name: Installing Nix
11+
uses: cachix/install-nix-action@v16
12+
with:
13+
nix_path: nixpkgs=channel:nixpkgs-unstable
14+
extra_nix_config: |
15+
accept-flake-config = true
16+
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
17+
substituters = https://hydra.iohk.io https://cache.nixos.org/
18+
19+
- uses: cachix/cachix-action@v10
20+
with:
21+
name: iog
22+
authToken: '${{ inputs.CACHIX_AUTH_TOKEN }}'

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
updates:
3+
4+
- package-ecosystem: github-actions
5+
directory: "/"
6+
schedule:
7+
interval: daily
8+
time: '00:00'
9+
timezone: UTC
10+
open-pull-requests-limit: 10
11+
commit-message:
12+
prefix: "chore"
13+
include: "scope"

.github/workflows/audit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
security_audit:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v3
1111

1212
- id: ls-crates-io-index
1313
name: Get head commit hash of crates.io registry index
@@ -18,7 +18,7 @@ jobs:
1818
)
1919
echo "::set-output name=head::$commit"
2020
- name: Cache cargo registry index
21-
uses: actions/cache@v2
21+
uses: actions/cache@v3
2222
with:
2323
path: ~/.cargo/registry/index
2424
key: cargo-index-${{ steps.ls-crates-io-index.outputs.head }}

.github/workflows/nix.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Nix CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- catalyst-fund*
7+
pull_request:
8+
9+
jobs:
10+
decision:
11+
name: Decide what we need to build
12+
runs-on: ubuntu-latest
13+
14+
outputs:
15+
packages: ${{ steps.packages.outputs.packages }}
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v3
20+
21+
- name: Setup
22+
uses: ./.github/actions/nix-common-setup
23+
with:
24+
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
25+
26+
- name: Packages
27+
id: packages
28+
run: |
29+
packages=$(nix eval .#packages.x86_64-linux --apply builtins.attrNames --json)
30+
echo "PACKAGES -> $packages"
31+
echo "::set-output name=packages::$packages"
32+
33+
build:
34+
name: Build ${{ matrix.package }} package
35+
needs:
36+
- decision
37+
runs-on: ubuntu-latest
38+
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
package: ${{ fromJSON(needs.decision.outputs.packages) }}
43+
exclude:
44+
- package: default
45+
46+
steps:
47+
48+
- name: Checkout
49+
uses: actions/checkout@v3
50+
51+
- name: Setup
52+
uses: ./.github/actions/nix-common-setup
53+
with:
54+
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
55+
56+
- name: Build package
57+
run: |
58+
path=$(nix eval --raw .#packages.x86_64-linux.${{ matrix.package }})
59+
hash=${path:11:32}
60+
url="https://iog.cachix.org/$hash.narinfo";
61+
if curl --output /dev/null --silent --head --fail "$url"; then
62+
echo "Nothing to build!!!"
63+
echo ""
64+
echo "See build log with:"
65+
echo " nix log $path"
66+
echo ""
67+
else
68+
nix build .#packages.x86_64-linux.${{ matrix.package }} --show-trace -L
69+
fi

.github/workflows/python-scripts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- name: Install linters
1111
run: pip3 install black
1212

13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1414

1515
- name: Check formatting (black)
1616
run: black ./catalyst-toolbox/scripts/python --check

.github/workflows/release.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
upload_url: ${{ steps.create_release.outputs.upload_url }}
2222
steps:
2323
- name: Checkout code
24-
uses: actions/checkout@v2
24+
uses: actions/checkout@v3
2525

2626
- id: release_info
2727
name: Get release information
@@ -51,7 +51,7 @@ jobs:
5151
cargo-lock-hash: ${{ steps.hash-cargo-lock.outputs.hash }}
5252
steps:
5353
- name: Checkout code
54-
uses: actions/checkout@v2
54+
uses: actions/checkout@v3
5555

5656
- id: ls-crates-io-index
5757
name: Get head commit hash of crates.io registry index
@@ -84,21 +84,21 @@ jobs:
8484
runs-on: ${{ matrix.os }}
8585
steps:
8686
- name: Cache cargo registry index
87-
uses: actions/cache@v2
87+
uses: actions/cache@v3
8888
with:
8989
path: ~/.cargo/registry/index
9090
key: cargo-index-${{ needs.cache_info.outputs.crates-io-index-head }}
9191
restore-keys: cargo-index-
9292

9393
- id: cargo-deps
9494
name: Cache cargo dependencies
95-
uses: actions/cache@v2
95+
uses: actions/cache@v3
9696
with:
9797
path: ~/.cargo/registry/cache
9898
key: cargo-deps-${{ needs.cache_info.outputs.cargo-lock-hash }}
9999

100100
- name: Check out the repository
101-
uses: actions/checkout@v2
101+
uses: actions/checkout@v3
102102
with:
103103
submodules: true
104104

@@ -135,7 +135,7 @@ jobs:
135135
default: true
136136

137137
- name: Checkout code
138-
uses: actions/checkout@v2
138+
uses: actions/checkout@v3
139139
with:
140140
submodules: true
141141

@@ -147,13 +147,13 @@ jobs:
147147
override: true
148148

149149
- name: Restore cargo registry index
150-
uses: actions/cache@v2
150+
uses: actions/cache@v3
151151
with:
152152
path: ~/.cargo/registry/index
153153
key: cargo-index-${{ needs.cache_info.outputs.crates-io-index-head }}
154154

155155
- name: Restore cargo dependencies
156-
uses: actions/cache@v2
156+
uses: actions/cache@v3
157157
with:
158158
path: ~/.cargo/registry/cache
159159
key: cargo-deps-${{ needs.cache_info.outputs.cargo-lock-hash }}
@@ -234,7 +234,7 @@ jobs:
234234
runs-on: ubuntu-latest
235235
steps:
236236
- name: Check out the repository
237-
uses: actions/checkout@v2
237+
uses: actions/checkout@v3
238238

239239
- name: Publish release
240240
env:

.github/workflows/test.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jobs:
1111
name: Update dependencies
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515

1616
- id: cargo-deps
1717
name: Cache cargo dependencies
18-
uses: actions/cache@v2
18+
uses: actions/cache@v3
1919
with:
2020
path: |
2121
~/.cargo/registry/index
@@ -34,7 +34,7 @@ jobs:
3434
echo "::set-output name=head::$commit"
3535
- if: ${{ steps.cargo-deps.outputs.cache-hit != 'true' }}
3636
name: Cache cargo registry index
37-
uses: actions/cache@v2
37+
uses: actions/cache@v3
3838
with:
3939
path: ~/.cargo/registry/index
4040
key: cargo-index-${{ steps.ls-crates-io-index.outputs.head }}
@@ -57,7 +57,7 @@ jobs:
5757
NOTIFICATION_APP_CODE: ${{ secrets.NOTIFICATION_APP_CODE }}
5858
NOTIFICATION_ACCESS_TOKEN: ${{ secrets.NOTIFICATION_ACCESS_TOKEN }}
5959
steps:
60-
- uses: actions/checkout@v2
60+
- uses: actions/checkout@v3
6161

6262
- name: Allow long paths on Windows
6363
if: ${{ runner.os == 'Windows' }}
@@ -76,7 +76,7 @@ jobs:
7676
}
7777
7878
- name: Restore cargo dependencies
79-
uses: actions/cache@v2
79+
uses: actions/cache@v3
8080
with:
8181
path: |
8282
~/.cargo/registry/index
@@ -115,7 +115,7 @@ jobs:
115115
env:
116116
CARGO_INCREMENTAL: 0
117117
steps:
118-
- uses: actions/checkout@v2
118+
- uses: actions/checkout@v3
119119
- uses: actions-rs/toolchain@v1
120120
with:
121121
profile: minimal
@@ -131,7 +131,7 @@ jobs:
131131
args: -- --check
132132

133133
- name: Restore cargo dependencies
134-
uses: actions/cache@v2
134+
uses: actions/cache@v3
135135
with:
136136
path: |
137137
~/.cargo/registry/index
@@ -156,7 +156,7 @@ jobs:
156156
NOTIFICATION_ACCESS_TOKEN: ${{ secrets.NOTIFICATION_ACCESS_TOKEN }}
157157

158158
steps:
159-
- uses: actions/checkout@v2
159+
- uses: actions/checkout@v3
160160

161161
- name: Install Rust toolchain
162162
uses: actions-rs/toolchain@v1
@@ -166,13 +166,13 @@ jobs:
166166
override: true
167167

168168
- name: Restore cargo registry index
169-
uses: actions/cache@v2
169+
uses: actions/cache@v3
170170
with:
171171
path: ~/.cargo/registry/index
172172
key: 'cargo-index-v2-${{ needs.update_deps.outputs.crates-io-index-head }}'
173173

174174
- name: Restore dependency crates
175-
uses: actions/cache@v2
175+
uses: actions/cache@v3
176176
with:
177177
path: ~/.cargo/registry/cache
178178
key: 'cargo-deps-v2-${{ hashFiles(''Cargo.lock'') }}'

0 commit comments

Comments
 (0)