44 push :
55 branches :
66 - release/**
7+ pull_request :
78
89env :
910 CARGO_TERM_COLOR : always
@@ -13,14 +14,26 @@ jobs:
1314 linux :
1415 name : Linux
1516 runs-on : ubuntu-22.04
17+ container :
18+ image : ubuntu:20.04
1619
1720 steps :
21+ - name : Install dependencies
22+ run : |
23+ apt-get update
24+ apt-get install -y --no-install-recommends git ca-certificates gcc libc6-dev curl make
25+
1826 - uses : actions/checkout@v4
1927 with :
2028 submodules : recursive
2129
30+ - name : Add git safe directory exception
31+ run : git config --global --add safe.directory "$(pwd)"
32+
2233 - name : Install Rust Toolchain
23- run : rustup toolchain install stable --profile minimal --no-self-update
34+ run : |
35+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --profile minimal --default-toolchain stable -y
36+ . "$HOME/.cargo/env"
2437
2538 - name : Build binary
2639 run : |
@@ -42,111 +55,111 @@ jobs:
4255 # since this artifact will be merged, compression is not necessary
4356 compression-level : ' 0'
4457
45- linux-aarch64 :
46- name : Linux Aarch64
47- runs-on : ubuntu-22.04-arm
48-
49- steps :
50- - uses : actions/checkout@v4
51- with :
52- submodules : recursive
53-
54- - name : Install Rust Toolchain
55- run : rustup toolchain install stable --profile minimal --no-self-update
56-
57- - name : Build binary
58- run : |
59- make build-linux-release
60- env :
61- RELAY_FEATURES :
62-
63- - name : Bundle Debug File
64- run : |
65- cd target/release/
66- zip relay-Linux-aarch64-debug.zip relay.debug
67- mv relay relay-Linux-aarch64
68-
69- - uses : actions/upload-artifact@v4
70- with :
71- name : artifact-linux-aarch64
72- path : target/release/relay-Linux-aarch64*
73- if-no-files-found : ' error'
74- # since this artifact will be merged, compression is not necessary
75- compression-level : ' 0'
76-
77- macos :
78- name : macOS
79- runs-on : macos-14
80-
81- steps :
82- - uses : actions/checkout@v4
83- with :
84- submodules : recursive
85-
86- - name : Install Rust Toolchain
87- run : rustup toolchain install stable --profile minimal --no-self-update
88-
89- - name : Run Cargo Build
90- run : cargo build --manifest-path=relay/Cargo.toml --release
91- env :
92- CARGO_PROFILE_RELEASE_SPLIT_DEBUGINFO : packed
93-
94- - name : Bundle dSYM
95- run : |
96- cd target/release
97- mv relay relay-Darwin-x86_64
98- zip -r relay-Darwin-x86_64-dsym.zip relay.dSYM
99-
100- - uses : actions/upload-artifact@v4
101- with :
102- name : artifact-macos
103- path : target/release/relay-Darwin-x86_64*
104- if-no-files-found : ' error'
105- # since this artifact will be merged, compression is not necessary
106- compression-level : ' 0'
107-
108- windows :
109- name : Windows
110- runs-on : windows-2019
111-
112- steps :
113- - uses : actions/checkout@v4
114- with :
115- submodules : recursive
116-
117- - name : Install Rust Toolchain
118- run : rustup toolchain install stable --profile minimal --no-self-update
119-
120- - name : Run Cargo Build
121- run : cargo build --manifest-path=relay/Cargo.toml --release
122-
123- - name : Bundle PDB
124- run : |
125- Install-Module 7Zip4PowerShell -Force -Verbose
126- cd target/release
127- 7z a relay-Windows-x86_64-pdb.zip relay.pdb
128- mv relay.exe relay-Windows-x86_64.exe
129-
130- - uses : actions/upload-artifact@v4
131- with :
132- name : artifact-windows
133- path : target/release/relay-Windows-x86_64*
134- if-no-files-found : ' error'
135- # since this artifact will be merged, compression is not necessary
136- compression-level : ' 0'
137-
138- merge :
139- name : Create Release Artifact
140- runs-on : ubuntu-latest
141- needs : [linux, linux-aarch64, macos, windows]
142- steps :
143- # Note: due to the immutability of artifacts in upload-artifact v4,
144- # there cannot be mutliple upload-artifacts with the same name, in a sha's workflow runs.
145- # However in this case it is fine because this only runs on release/** branches,
146- # and the other runs on release-library/** branches.
147- - uses : actions/upload-artifact/merge@v4
148- with :
149- # Craft expects release assets to be a single artifact named after the sha.
150- name : ${{ github.sha }}
151- pattern : artifact-*
152- delete-merged : true
58+ # linux-aarch64:
59+ # name: Linux Aarch64
60+ # runs-on: ubuntu-22.04-arm
61+ #
62+ # steps:
63+ # - uses: actions/checkout@v4
64+ # with:
65+ # submodules: recursive
66+ #
67+ # - name: Install Rust Toolchain
68+ # run: rustup toolchain install stable --profile minimal --no-self-update
69+ #
70+ # - name: Build binary
71+ # run: |
72+ # make build-linux-release
73+ # env:
74+ # RELAY_FEATURES:
75+ #
76+ # - name: Bundle Debug File
77+ # run: |
78+ # cd target/release/
79+ # zip relay-Linux-aarch64-debug.zip relay.debug
80+ # mv relay relay-Linux-aarch64
81+ #
82+ # - uses: actions/upload-artifact@v4
83+ # with:
84+ # name: artifact-linux-aarch64
85+ # path: target/release/relay-Linux-aarch64*
86+ # if-no-files-found: 'error'
87+ # # since this artifact will be merged, compression is not necessary
88+ # compression-level: '0'
89+ #
90+ # macos:
91+ # name: macOS
92+ # runs-on: macos-14
93+ #
94+ # steps:
95+ # - uses: actions/checkout@v4
96+ # with:
97+ # submodules: recursive
98+ #
99+ # - name: Install Rust Toolchain
100+ # run: rustup toolchain install stable --profile minimal --no-self-update
101+ #
102+ # - name: Run Cargo Build
103+ # run: cargo build --manifest-path=relay/Cargo.toml --release
104+ # env:
105+ # CARGO_PROFILE_RELEASE_SPLIT_DEBUGINFO: packed
106+ #
107+ # - name: Bundle dSYM
108+ # run: |
109+ # cd target/release
110+ # mv relay relay-Darwin-x86_64
111+ # zip -r relay-Darwin-x86_64-dsym.zip relay.dSYM
112+ #
113+ # - uses: actions/upload-artifact@v4
114+ # with:
115+ # name: artifact-macos
116+ # path: target/release/relay-Darwin-x86_64*
117+ # if-no-files-found: 'error'
118+ # # since this artifact will be merged, compression is not necessary
119+ # compression-level: '0'
120+ #
121+ # windows:
122+ # name: Windows
123+ # runs-on: windows-2019
124+ #
125+ # steps:
126+ # - uses: actions/checkout@v4
127+ # with:
128+ # submodules: recursive
129+ #
130+ # - name: Install Rust Toolchain
131+ # run: rustup toolchain install stable --profile minimal --no-self-update
132+ #
133+ # - name: Run Cargo Build
134+ # run: cargo build --manifest-path=relay/Cargo.toml --release
135+ #
136+ # - name: Bundle PDB
137+ # run: |
138+ # Install-Module 7Zip4PowerShell -Force -Verbose
139+ # cd target/release
140+ # 7z a relay-Windows-x86_64-pdb.zip relay.pdb
141+ # mv relay.exe relay-Windows-x86_64.exe
142+ #
143+ # - uses: actions/upload-artifact@v4
144+ # with:
145+ # name: artifact-windows
146+ # path: target/release/relay-Windows-x86_64*
147+ # if-no-files-found: 'error'
148+ # # since this artifact will be merged, compression is not necessary
149+ # compression-level: '0'
150+ #
151+ # merge:
152+ # name: Create Release Artifact
153+ # runs-on: ubuntu-latest
154+ # needs: [linux, linux-aarch64, macos, windows]
155+ # steps:
156+ # # Note: due to the immutability of artifacts in upload-artifact v4,
157+ # # there cannot be mutliple upload-artifacts with the same name, in a sha's workflow runs.
158+ # # However in this case it is fine because this only runs on release/** branches,
159+ # # and the other runs on release-library/** branches.
160+ # - uses: actions/upload-artifact/merge@v4
161+ # with:
162+ # # Craft expects release assets to be a single artifact named after the sha.
163+ # name: ${{ github.sha }}
164+ # pattern: artifact-*
165+ # delete-merged: true
0 commit comments