Skip to content

Commit

Permalink
Github actions: use cache for Tcl/SSL compilations (#1652)
Browse files Browse the repository at this point in the history
* Use cache for Tcl/SSL compilations
* Test home directory change
* Home directories for cache must be specified with ~, $HOME does not work
* Fix if-condition syntax error
  • Loading branch information
thommey authored Jul 14, 2024
1 parent a49c225 commit 1f49bfe
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ jobs:
- uses: actions/checkout@v4
- name: install dependencies
run: sudo apt-get install openssl libssl-dev
- uses: actions/cache@v4
id: tcl-cache
with:
path: ~/tcl
key: ${{ runner.os }}-tcl-${{ matrix.tcl_version }}
- name: Build Tcl
if: steps.tcl-cache.outputs.cache-hit != 'true'
run: |
wget http://prdownloads.sourceforge.net/tcl/tcl${{ matrix.tcl_version }}-src.tar.gz && \
tar xzf tcl${{ matrix.tcl_version }}-src.tar.gz && \
Expand All @@ -37,7 +43,13 @@ jobs:
path: 'eggdrop'
- name: install dependencies
run: sudo apt-get install tcl tcl-dev
- uses: actions/cache@v4
id: ssl-cache
with:
path: ~/ssl
key: ${{ runner.os }}-ssl-0.9.8zh
- name: Build OpenSSL
if: steps.ssl-cache.outputs.cache-hit != 'true'
run: |
wget https://www.openssl.org/source/old/0.9.x/openssl-0.9.8zh.tar.gz && \
sha256sum --status --check <(echo f1d9f3ed1b85a82ecf80d0e2d389e1fda3fca9a4dba0bf07adbf231e1a5e2fd6 openssl-0.9.8zh.tar.gz) && \
Expand All @@ -55,7 +67,13 @@ jobs:
path: 'eggdrop'
- name: install dependencies
run: sudo apt-get install tcl tcl-dev
- uses: actions/cache@v4
id: ssl-cache
with:
path: ~/ssl
key: ${{ runner.os }}-ssl-1.0.2u
- name: Build OpenSSL
if: steps.ssl-cache.outputs.cache-hit != 'true'
run: |
wget https://www.openssl.org/source/old/1.0.2/openssl-1.0.2u.tar.gz && \
sha256sum --status --check <(echo ecd0c6ffb493dd06707d38b14bb4d8c2288bb7033735606569d8f90f89669d16 openssl-1.0.2u.tar.gz) && \
Expand All @@ -68,12 +86,19 @@ jobs:
continue-on-error: true
runs-on: ubuntu-latest
steps:
- uses: actions/cache@v4
id: ssl-cache
with:
path: ~/ssl
key: ${{ runner.os }}-ssl-1.1.1w
- uses: actions/checkout@v4
if: steps.ssl-cache.outputs.cache-hit != 'true'
with:
repository: openssl/openssl
ref: 'OpenSSL_1_1_1w'
path: 'openssl'
- name: Build OpenSSL
if: steps.ssl-cache.outputs.cache-hit != 'true'
run: |
cd $GITHUB_WORKSPACE/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw
- name: install dependencies
Expand All @@ -99,12 +124,19 @@ jobs:
regex: "${{ matrix.ssl_version }}.[0-9]+"
sort-tags: true
id: openssl
- uses: actions/cache@v4
id: ssl-cache
with:
path: ~/ssl
key: ${{ runner.os }}-ssl-${{ steps.openssl.outputs.tag }}
- uses: actions/checkout@v4
if: steps.ssl-cache.outputs.cache-hit != 'true'
with:
repository: openssl/openssl
ref: ${{ steps.openssl.outputs.tag }}
path: 'openssl'
- name: Build OpenSSL
if: steps.ssl-cache.outputs.cache-hit != 'true'
run: |
cd $GITHUB_WORKSPACE/openssl && ./config --prefix=$HOME/ssl && make -j4 && make install_sw
- uses: actions/checkout@v4
Expand Down

0 comments on commit 1f49bfe

Please sign in to comment.