Skip to content

Commit e0c50ac

Browse files
committed
gh-actions: init
1 parent 90e5990 commit e0c50ac

File tree

2 files changed

+86
-0
lines changed

2 files changed

+86
-0
lines changed

.github/dependabot.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
8+
updates:
9+
- package-ecosystem: "github-actions"
10+
directory: "/"
11+
schedule:
12+
interval: "daily"
13+
14+
- package-ecosystem: "docker"
15+
directory: "/"
16+
schedule:
17+
interval: "daily"

.github/workflows/ci.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
tags: [ '*' ]
7+
pull_request:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
target:
20+
- x86_64-unknown-linux-gnu
21+
- aarch64-unknown-linux-gnu
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- uses: actions/cache@v4
27+
with:
28+
path: |
29+
~/.cargo/bin/
30+
~/.cargo/registry/index/
31+
~/.cargo/registry/cache/
32+
~/.cargo/git/db/
33+
target/
34+
key: ${{ runner.os }}-cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
35+
restore-keys: |
36+
${{ runner.os }}-cargo-${{ matrix.target }}-
37+
38+
- uses: dtolnay/rust-toolchain@stable
39+
40+
- name: Install cross
41+
run: wget -cO - https://github.com/cross-rs/cross/releases/latest/download/cross-x86_64-unknown-linux-gnu.tar.gz | tar -xz
42+
43+
- name: Build
44+
run: ./cross build --release --target ${{ matrix.target }}
45+
46+
- name: Rename binary
47+
run: |
48+
mv target/${{ matrix.target }}/release/post post_${{ matrix.target }}
49+
50+
- uses: actions/upload-artifact@v3
51+
with:
52+
name: post_${{ matrix.target }}
53+
path: post_${{ matrix.target }}
54+
55+
- uses: crazy-max/ghaction-github-release@v2
56+
if: startsWith(github.ref, 'refs/tags/')
57+
with:
58+
files: post_${{ matrix.target }}
59+
60+
nix:
61+
needs: build
62+
runs-on: ubuntu-latest
63+
steps:
64+
- uses: actions/checkout@v4
65+
66+
- uses: cachix/install-nix-action@V27
67+
68+
- run: nix build -L
69+
- run: nix flake check -L

0 commit comments

Comments
 (0)