forked from CarbonCommunity/Carbon
-
Notifications
You must be signed in to change notification settings - Fork 0
168 lines (143 loc) · 6.12 KB
/
Copy pathrust-aux03-build.yml
File metadata and controls
168 lines (143 loc) · 6.12 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: Rust (Aux03) Build
concurrency: build-aux03
on:
workflow_dispatch:
jobs:
build:
name: Rust (Aux03) Build
runs-on: ubuntu-latest
container: rust:bullseye
continue-on-error: false
outputs:
date: ${{ steps.step1.outputs.date }}
clock: ${{ steps.step1.outputs.clock }}
tag: ${{ steps.step1.outputs.tag }}
ref: ${{ steps.step1.outputs.ref }}
version: ${{ steps.step1.outputs.version }}
steps:
- name: Git Clone
uses: actions/checkout@v3
with:
ref: rust_beta/aux03
token: ${{ secrets.PAT_ALL_REPO }}
submodules: recursive
- name: Environment Setup
id: step1
shell: bash
run: |
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
echo "clock=$(date +'%H:%M:%S')" >> $GITHUB_OUTPUT
echo "tag=$(date +'%Yd%j')" >> $GITHUB_OUTPUT
echo "ref=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "version=2.7.$(curl -s -L 'https://api.carbonmod.gg/version?id=aux03&token=${{secrets.VERSIONS_TOKEN}}')" >> $GITHUB_OUTPUT
git config --global --add safe.directory /__w/Carbon/Carbon
- name: Rust Setup
shell: bash
run: |
apt update
apt install -y mingw-w64
rustup install stable
rustup default stable
rustup target add x86_64-pc-windows-gnu
rustup component add rust-std --target x86_64-pc-windows-gnu
rustup show
rustc --print sysroot
which x86_64-w64-mingw32-dlltool || echo "dlltool not found"
x86_64-w64-mingw32-dlltool --version
- name: Setup .NET 8 SDK
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.406
- name: Setup .NET 9 SDK
uses: actions/setup-dotnet@v2
with:
dotnet-version: 9.0.203
- name: Carbon.Native Toolchain
uses: dtolnay/rust-toolchain@stable
- name: Carbon.Native Build (Linux)
uses: ClementTsang/cargo-action@v0.0.3
with:
command: build
args: -r --target x86_64-unknown-linux-gnu
directory: Carbon.Core/Carbon.Native
- name: Carbon.Native Build (Windows)
uses: ClementTsang/cargo-action@v0.0.3
with:
command: build
args: -r --target x86_64-pc-windows-gnu
directory: Carbon.Core/Carbon.Native
- name: Carbon Bootstrap
shell: bash
run: |
dotnet run --project Carbon.Core/Carbon.Tools/Carbon.Runner Tools/Build/runners/bootstrap.cs
dotnet run --project Carbon.Core/Carbon.Tools/Carbon.Runner Tools/Build/runners/update.cs aux03
- name: Carbon Build
shell: bash
run: |
export VERSION=${{ steps.step1.outputs.version }}
dotnet run --project Carbon.Core/Carbon.Tools/Carbon.Runner Tools/Build/runners/build.cs Debug RUST_AUX03 rustbeta_aux03_build
dotnet run --project Carbon.Core/Carbon.Tools/Carbon.Runner Tools/Build/runners/build.cs DebugUnix RUST_AUX03 rustbeta_aux03_build
dotnet run --project Carbon.Core/Carbon.Tools/Carbon.Runner Tools/Build/runners/build.cs Minimal RUST_AUX03 rustbeta_aux03_build
dotnet run --project Carbon.Core/Carbon.Tools/Carbon.Runner Tools/Build/runners/build.cs MinimalUnix RUST_AUX03 rustbeta_aux03_build
- name: Artifacts
uses: actions/upload-artifact@v4
with:
name: build
path: |
Release/Carbon.Linux.Debug.tar.gz
Release/Carbon.Linux.Debug.info
Release/Carbon.Linux.Minimal.tar.gz
Release/Carbon.Linux.Minimal.info
Release/Carbon.Windows.Debug.zip
Release/Carbon.Windows.Debug.info
Release/Carbon.Windows.Minimal.zip
Release/Carbon.Windows.Minimal.info
release-on-commit:
name: Rust (Aux03) Release
needs: ["build"]
runs-on: ubuntu-latest
steps:
- name: 🗑️ Delete existing release tag
uses: dev-drprasad/delete-tag-and-release@92d94d77429cb0436597047a92369526a5824f50
with:
delete_release: true
tag_name: rustbeta_aux03_build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 💤 Sleep for 5 seconds
run: sleep 5s
shell: bash
- name: ⬇️ Download artifacts
uses: actions/download-artifact@v4
with:
path: Release
- name: Display structure of downloaded files
run: ls -R
working-directory: Release
- name: 🏷️ Update release tag
uses: softprops/action-gh-release@a92196038060e0c673cf3ba5b98710dd716731df
with:
draft: false
prerelease: true
tag_name: rustbeta_aux03_build
name: "Rust (Aux03) Build — v${{ needs.build.outputs.version }}"
body: |
This is a manually triggered development build of Carbon based on the `rust_beta/aux03` branch.
This build might and probably will be very unstable and its sole purpose is for testing and/or exploring Rust's future update features in a modded environment.
This build is targeted at developers or testers.
The general public is advised to use one of the [stable] builds.
Since it's manually triggered, we're confident you should use this build to test out the latest Carbon changes.
### How to install
1. Download the `Carbon.[Windows|Linux].Debug` archive from the attachments below.
2. Unzip the archive to the root of your Rust Dedicated Server.
3. Restart the server and enjoy.
[stable]: https://github.com/CarbonCommunity/Carbon.Core/releases/latest
files: |
Release/build/Carbon.Linux.Debug.info
Release/build/Carbon.Linux.Debug.tar.gz
Release/build/Carbon.Linux.Minimal.info
Release/build/Carbon.Linux.Minimal.tar.gz
Release/build/Carbon.Windows.Debug.info
Release/build/Carbon.Windows.Debug.zip
Release/build/Carbon.Windows.Minimal.info
Release/build/Carbon.Windows.Minimal.zip