forked from datenlord/s3-server
-
Notifications
You must be signed in to change notification settings - Fork 1
87 lines (81 loc) · 2.35 KB
/
wasix.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: CI
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-reusable
cancel-in-progress: true
jobs:
build-wasix:
runs-on: ubuntu-22.04
name: "Build WASIX"
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Install Tools
run: |
sudo apt-get update
sudo apt-get install -y git llvm clang make lld curl rclone
- name: "Install cargo-wasix"
run: |
cargo install cargo-wasix
- name: "Download Toolchain"
run: |
cargo wasix download-toolchain v2024-06-26.1
- name: "Build"
run: |
cargo wasix build --features=binary --release --bin s3-server
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: s3-server
path: target/wasm32-wasmer-wasi/release/s3-server.wasm
test-wasix:
runs-on: ubuntu-22.04
needs: build-wasix
name: "Test WASIX"
steps:
- uses: actions/checkout@v4
- name: Setup Wasmer
uses: wasmerio/[email protected]
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: s3-server
- name: List contents
run: |
ls
- name: Install Tools
run: |
sudo apt-get update
sudo apt-get install -y git llvm clang make lld curl rclone
- name: "Create rclone config"
run: |
mkdir -p ~/.config/rclone
printf "[data]\ntype = s3\nprovider = Other\nacl = private\naccess_key_id = access-key-id\nsecret_access_key = secret-access-key\nendpoint = http://localhost:8080" > ~/.config/rclone/rclone.conf
cat ~/.config/rclone/rclone.conf
RUN_RCLONE=1 ./scripts/wasix-test.sh
publish:
runs-on: ubuntu-22.04
# if: ${{ github.ref == 'refs/heads/master' }}
needs: [build-wasix, test-wasix]
name: "Publish"
steps:
- uses: actions/checkout@v4
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: s3-server
- name: Setup Wasmer
uses: wasmerio/[email protected]
- name: List contents
run: |
ls
- name: "Push"
run: |
wasmer package push --registry="wasmer.io" --non-interactive --token=${{ secrets.WASMER_CIUSER_PROD_TOKEN }} .