Skip to content

Commit

Permalink
Push sed edits into subscript
Browse files Browse the repository at this point in the history
  • Loading branch information
j-woz committed Sep 9, 2024
1 parent 1621cf2 commit 5d37768
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
16 changes: 2 additions & 14 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,10 @@ jobs:
# - name: Upgrade pip
# run: python -m pip install -U pip

- name: Initialize swift-t settings (Ubuntu)
if: matrix.os == 'ubuntu-latest'
- name: Initialize swift-t settings
run: |
dev/build/init-settings.sh
sed -i 's/ENABLE_PYTHON=0/ENABLE_PYTHON=1/g' dev/build/swift-t-settings.sh
- name: Initialize swift-t settings (Mac)
if: startsWith(matrix.os, 'macos-14')
run: |
dev/build/init-settings.sh
# Add GNU tools to PATH [HERE]
sed -i '' 's/ENABLE_PYTHON=0/ENABLE_PYTHON=1/g' dev/build/swift-t-settings.sh
# Only effective on MacOS/Homebrew systems:
# echo 'PATH=/opt/homebrew/opt/make/libexec/gnubin:$PATH' >> dev/build/swift-t-settings.sh
# ls /opt/homebrew/opt/make/libexec/gnubin
which make gmake sed java
dev/github-actions/edit-settings.sh
# TODO set swift-t install, R, python, and ??
# sed -i 's/original/new/g' file.txt
Expand Down
12 changes: 12 additions & 0 deletions dev/github-actions/edit-settings.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
set -eu

# SETTINGS SH
# Edit swift-t-settings.sh via settings.sed
# Assumes PWD is the top of the Swift/T clone
# We immediately cd into /dev/

cd dev
SETTINGS_SH=build/swift-t-settings.sh
echo "Editing $SETTINGS_SH ..."
sed -i -f github-actions/settings.sed build/swift-t-settings.sh
8 changes: 8 additions & 0 deletions dev/github-actions/settings.sed
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# sed edits to swift-t-settings.sh

s/ENABLE_PYTHON=0/ENABLE_PYTHON=1/
s/MAKE_PARALLELISM=1/MAKE_PARALLELISM=4/

# Local Variables:
# mode: sh;
# End:

0 comments on commit 5d37768

Please sign in to comment.