Skip to content

Commit

Permalink
Add rustg caching
Browse files Browse the repository at this point in the history
  • Loading branch information
SuhEugene committed Nov 17, 2023
1 parent 96974a3 commit 447d52a
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 11 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ env:
BYOND_MAJOR: "514"
BYOND_MINOR: "1589"
SPACEMAN_DMM_VERSION: suite-1.7.3
RUST_G_REPO: "ss220-space/rust-g-tg"
RUST_G_VERSION: "2.0.0-ss220"

jobs:
PreFlight:
Expand Down Expand Up @@ -94,7 +96,15 @@ jobs:
with:
path: ~/BYOND-${{ env.BYOND_MAJOR }}.${{ env.BYOND_MINOR }}
key: ${{ runner.os }}-byond-${{ env.BYOND_MAJOR }}-${{ env.BYOND_MINOR }}
- name: Install rust_g dependencies
run: ./scripts/install-rust_g-dependencies.sh
- name: Cache rust_g
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
with:
path: ~/.byond/bin/librust_g.so
key: "rust_g-${{ env.RUST_G_REPO }}-${{ env.RUST_G_VERSION }}"
- name: Install rust_g
if: steps.Cache-rust_g.outputs.cache-hit != 'true'
run: ./scripts/install-rust_g.sh
- name: Run Tests
env:
Expand Down Expand Up @@ -125,7 +135,15 @@ jobs:
with:
path: ~/BYOND-${{ env.BYOND_MAJOR }}.${{ env.BYOND_MINOR }}
key: ${{ runner.os }}-byond-${{ env.BYOND_MAJOR }}-${{ env.BYOND_MINOR }}
- name: Install rust_g dependencies
run: ./scripts/install-rust_g-dependencies.sh
- name: Cache rust_g
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
with:
path: ~/.byond/bin/librust_g.so
key: "rust_g-${{ env.RUST_G_REPO }}-${{ env.RUST_G_VERSION }}"
- name: Install rust_g
if: steps.Cache-rust_g.outputs.cache-hit != 'true'
run: ./scripts/install-rust_g.sh
- name: Run Tests
env:
Expand Down Expand Up @@ -156,7 +174,15 @@ jobs:
with:
path: ~/BYOND-${{ env.BYOND_MAJOR }}.${{ env.BYOND_MINOR }}
key: ${{ runner.os }}-byond-${{ env.BYOND_MAJOR }}-${{ env.BYOND_MINOR }}
- name: Install rust_g dependencies
run: ./scripts/install-rust_g-dependencies.sh
- name: Cache rust_g
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
with:
path: ~/.byond/bin/librust_g.so
key: "rust_g-${{ env.RUST_G_REPO }}-${{ env.RUST_G_VERSION }}"
- name: Install rust_g
if: steps.Cache-rust_g.outputs.cache-hit != 'true'
run: ./scripts/install-rust_g.sh
- name: Run Tests
env:
Expand Down
10 changes: 10 additions & 0 deletions scripts/install-rust_g-dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail

sudo dpkg --add-architecture i386
sudo apt update || true
sudo apt remove -y libssl1.1:amd64 || true
sudo apt install libgcc-s1:i386
sudo apt install -o APT::Immediate-Configure=false libc6:i386
wget http://ftp.de.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1n-0+deb10u6_i386.deb
sudo dpkg -i libssl1.1_1.1.1n-0+deb10u6_i386.deb
12 changes: 1 addition & 11 deletions scripts/install-rust_g.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail

# Install dependencies
sudo dpkg --add-architecture i386
sudo apt update || true
sudo apt remove -y libssl1.1:amd64 || true
sudo apt install libgcc-s1:i386
sudo apt install -o APT::Immediate-Configure=false libc6:i386
wget http://ftp.de.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1n-0+deb10u6_i386.deb
sudo dpkg -i libssl1.1_1.1.1n-0+deb10u6_i386.deb

# Download rust_g
mkdir -p ~/.byond/bin
wget -O ~/.byond/bin/librust_g.so "https://github.com/ss220-space/rust-g-tg/releases/download/2.0.0-ss220/librust_g.so"
wget -O ~/.byond/bin/librust_g.so "https://github.com/${RUST_G_REPO}/releases/download/${RUST_G_VERSION}/librust_g.so"
chmod +x ~/.byond/bin/librust_g.so
ldd ~/.byond/bin/librust_g.so

0 comments on commit 447d52a

Please sign in to comment.