Skip to content

Commit cdce26c

Browse files
authored
Merge pull request #13 from Steake/copilot/test-qa-bitcell-wallet
Add BDD-style integration tests for BitCell Wallet
2 parents 3ac0f25 + 754dbc5 commit cdce26c

4 files changed

Lines changed: 2871 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [created]
6+
workflow_dispatch:
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
RUST_BACKTRACE: 1
11+
12+
jobs:
13+
build:
14+
name: Build ${{ matrix.target }}
15+
runs-on: ${{ matrix.os }}
16+
permissions:
17+
contents: read
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
include:
22+
- os: ubuntu-latest
23+
target: x86_64-unknown-linux-gnu
24+
artifact_name: bitcell-linux-x86_64
25+
- os: macos-latest
26+
target: x86_64-apple-darwin
27+
artifact_name: bitcell-macos-x86_64
28+
- os: macos-14 # Native ARM64 runner
29+
target: aarch64-apple-darwin
30+
artifact_name: bitcell-macos-aarch64
31+
- os: windows-latest
32+
target: x86_64-pc-windows-msvc
33+
artifact_name: bitcell-windows-x86_64
34+
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- name: Install Rust
39+
uses: dtolnay/rust-toolchain@stable
40+
with:
41+
targets: ${{ matrix.target }}
42+
43+
- name: Cache cargo registry
44+
uses: actions/cache@v4
45+
with:
46+
path: |
47+
~/.cargo/registry
48+
~/.cargo/git
49+
target
50+
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}
51+
restore-keys: |
52+
${{ runner.os }}-${{ matrix.target }}-cargo-
53+
54+
- name: Build release binaries
55+
run: cargo build --release --target ${{ matrix.target }} -p bitcell-node -p bitcell-admin
56+
57+
- name: Create artifact directory
58+
shell: bash
59+
run: mkdir -p artifacts
60+
61+
- name: Copy binaries (Unix)
62+
if: runner.os != 'Windows'
63+
shell: bash
64+
run: |
65+
cp target/${{ matrix.target }}/release/bitcell-node artifacts/
66+
cp target/${{ matrix.target }}/release/bitcell-admin artifacts/
67+
68+
- name: Copy binaries (Windows)
69+
if: runner.os == 'Windows'
70+
shell: bash
71+
run: |
72+
cp target/${{ matrix.target }}/release/bitcell-node.exe artifacts/
73+
cp target/${{ matrix.target }}/release/bitcell-admin.exe artifacts/
74+
75+
- name: Create archive (Unix)
76+
if: runner.os != 'Windows'
77+
shell: bash
78+
run: |
79+
cd artifacts
80+
tar -czvf ../${{ matrix.artifact_name }}.tar.gz *
81+
cd ..
82+
83+
- name: Create archive (Windows)
84+
if: runner.os == 'Windows'
85+
shell: pwsh
86+
run: |
87+
Compress-Archive -Path artifacts/* -DestinationPath ${{ matrix.artifact_name }}.zip
88+
89+
- name: Upload artifact (Unix)
90+
if: runner.os != 'Windows'
91+
uses: actions/upload-artifact@v4
92+
with:
93+
name: ${{ matrix.artifact_name }}
94+
path: ${{ matrix.artifact_name }}.tar.gz
95+
retention-days: 7
96+
97+
- name: Upload artifact (Windows)
98+
if: runner.os == 'Windows'
99+
uses: actions/upload-artifact@v4
100+
with:
101+
name: ${{ matrix.artifact_name }}
102+
path: ${{ matrix.artifact_name }}.zip
103+
retention-days: 7
104+
105+
release:
106+
name: Upload Release Assets
107+
needs: build
108+
runs-on: ubuntu-latest
109+
if: github.event_name == 'release'
110+
permissions:
111+
contents: write
112+
113+
steps:
114+
- name: Download all artifacts
115+
uses: actions/download-artifact@v4
116+
with:
117+
path: artifacts
118+
119+
- name: Display structure of downloaded files
120+
run: ls -la artifacts/
121+
122+
- name: Upload release assets
123+
uses: softprops/action-gh-release@v2
124+
with:
125+
files: |
126+
artifacts/bitcell-linux-x86_64/bitcell-linux-x86_64.tar.gz
127+
artifacts/bitcell-macos-x86_64/bitcell-macos-x86_64.tar.gz
128+
artifacts/bitcell-macos-aarch64/bitcell-macos-aarch64.tar.gz
129+
artifacts/bitcell-windows-x86_64/bitcell-windows-x86_64.zip
130+
env:
131+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)