Skip to content

Commit

Permalink
Removes sub-module 'scripts'
Browse files Browse the repository at this point in the history
  • Loading branch information
hoijui committed Jun 3, 2024
1 parent aaec8b4 commit 6360054
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 18 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
- '**/Cargo.toml'
- 'Cargo.lock'
- '**/Cargo.lock'
- 'scripts/build'
- 'run/rp/build'
- '.github/workflows/build.yml'
release:
types: [ published ]
Expand All @@ -38,8 +38,18 @@ jobs:
fetch-depth: 0
submodules: true

- name: "Check out the build scripts"
uses: actions/checkout@v4
with:
repository: 'hoijui/rust-project-scripts'
path: 'run/rp'
submodules: true

- name: "Mark the build scripts as Git-ignored, locally"
run: if ! grep -q -r "^/run/rp/\$" .git/info/exclude; then echo '/run/rp/' >> .git/info/exclude; fi

- name: "Install STOML (BASH TOML parser)"
run: scripts/install_stoml
run: run/rp/install_stoml

- name: "Setup Python 3"
uses: actions/setup-python@v4
Expand All @@ -61,11 +71,10 @@ jobs:
uses: Swatinem/rust-cache@v2

- name: "Install STOML (BASH TOML parser) *again*, because the cache recreation above might have removed it"
run: scripts/install_stoml
run: run/rp/install_stoml

- name: "Build"
run: scripts/build
run: run/rp/build

- name: "Test & Check"
run: scripts/test

run: run/rp/test
36 changes: 28 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,23 @@ jobs:
fetch-depth: 0
submodules: true

- name: "Check out the build scripts"
uses: actions/checkout@v4
with:
repository: 'hoijui/rust-project-scripts'
path: 'run/rp'
submodules: true

- name: "Mark the build scripts as Git-ignored, locally"
run: if ! grep -q -r "^/run/rp/\$" .git/info/exclude; then echo '/run/rp/' >> .git/info/exclude; fi

- name: "Install STOML (BASH TOML parser)"
run: scripts/install_stoml
run: run/rp/install_stoml

- name: Set the environment variables (including OUR_VERSION)
shell: bash
if: env.OUR_VERSION == ''
run: scripts/env
run: run/rp/env

- name: Create GitHub release
id: release
Expand Down Expand Up @@ -109,19 +119,29 @@ jobs:
fetch-depth: 0
submodules: true

- name: "Check out the build scripts"
uses: actions/checkout@v4
with:
repository: 'hoijui/rust-project-scripts'
path: 'run/rp'
submodules: true

- name: "Mark the build scripts as Git-ignored, locally"
run: if ! grep -q -r "^/run/rp/\$" .git/info/exclude; then echo '/run/rp/' >> .git/info/exclude; fi

- name: "Install STOML (BASH TOML parser)"
run: |
scripts/install_stoml
run/rp/install_stoml
- name: Set the environment variables (including OUR_VERSION)
shell: bash
if: env.OUR_VERSION == ''
run: scripts/env
run: run/rp/env

- name: Install packages (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
scripts/install_deps_ubuntu
run/rp/install_deps_ubuntu
# - name: Install packages (macOS)
# if: matrix.os == 'macos-latest'
Expand Down Expand Up @@ -149,7 +169,7 @@ jobs:
echo "target dir is: ${{ env.TARGET_DIR }}"
- name: Build and strip release binary
run: scripts/build --skip-strip
run: run/rp/build --skip-strip

# - name: Strip release binary (linux and macos)
# if: matrix.build == 'linux' || matrix.build == 'macos'
Expand All @@ -169,7 +189,7 @@ jobs:
run: |
export ENV_FILE="proj_build_envs.txt"
# This writes "BINARY=bla" to ENV_FILE
scripts/env
run/rp/env
source "$ENV_FILE"
BIN="target/release/$BINARY"
if [ -f "$BIN" ]
Expand All @@ -195,7 +215,7 @@ jobs:
- name: Build archive
shell: bash
run: |
scripts/package
run/rp/package
- name: Upload release archive
uses: actions/upload-release-asset@v1.0.1
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
#
# SPDX-License-Identifier: Unlicense

[submodule "scripts"]
path = scripts
url = https://github.com/hoijui/rust-project-scripts.git
[submodule "resources/osh-dir-std"]
path = lib/resources/osh-dir-std
url = https://github.com/hoijui/osh-dir-std.git
1 change: 0 additions & 1 deletion scripts
Submodule scripts deleted from 51a9c6

0 comments on commit 6360054

Please sign in to comment.