Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update actions, add dev.eessi.io and prepare for MacOS support #24

Merged
merged 31 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c7ba4c5
Update actions and start work on MacOS support
ocaisa Jun 4, 2024
21d0ab4
Check both repos are available
ocaisa Jun 4, 2024
4233d12
Test MacOS
ocaisa Jun 4, 2024
c4e0b80
Make sure to use CVMFS action with MacOS support
ocaisa Jun 4, 2024
0127493
Make repositories configurable
ocaisa Jun 4, 2024
5d8ef6e
Test their own repos
ocaisa Jun 4, 2024
48d8596
Test their own repos
ocaisa Jun 4, 2024
5b16440
Config repo needed for macOS?
ocaisa Jun 4, 2024
b306929
Always mount config repo
ocaisa Jun 4, 2024
b2e730d
Install lima on macOS
ocaisa Jun 4, 2024
00f5928
Create lima container
ocaisa Jun 4, 2024
0cee9c6
Start lima EESSI container
ocaisa Jun 4, 2024
c98bd55
Start lima EESSI container
ocaisa Jun 4, 2024
e3dc795
Try different image
ocaisa Jun 4, 2024
616e417
See if doing everything via lima helps
ocaisa Jun 4, 2024
293866f
Try a default lima
ocaisa Jun 4, 2024
8150732
See if it is a specific qemu problem
ocaisa Jun 4, 2024
ee832d4
See if it is a specific qemu problem
ocaisa Jun 4, 2024
dcb0ef8
Avoid qemu
ocaisa Jun 4, 2024
900b76a
Avoid qemu
ocaisa Jun 4, 2024
05cf8dc
Avoid qemu
ocaisa Jun 4, 2024
f516f4e
Avoid qemu
ocaisa Jun 4, 2024
fa0d4bf
Avoid qemu
ocaisa Jun 4, 2024
78f30f9
Avoid qemu
ocaisa Jun 4, 2024
be7f76b
Avoid qemu
ocaisa Jun 4, 2024
96b180b
Avoid qemu
ocaisa Jun 4, 2024
f60320b
Just leave it as preparatory work for macOS
ocaisa Jun 11, 2024
6bce7c6
Replace macOS placeholder CI
ocaisa Jun 11, 2024
f1320d4
Stick to latest macOS
ocaisa Jun 11, 2024
ff8d859
Match up names
ocaisa Jun 11, 2024
1db264e
Match up names
ocaisa Jun 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/create_tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
fetch-depth: '0'
- uses: robinraju/release-downloader@d6de084c58345d09b017e22701dbcf26977cfd14 # v1.6
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: macOS-placeholder
name: macOS-minimal
on:
push:
branches:
Expand All @@ -12,14 +12,15 @@ jobs:
macOS-minimal:
runs-on: macos-latest
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
#- uses: eessi/github-action-eessi@main
# with:
# eessi_config_package: 'https://github.com/EESSI/filesystem-layer/releases/download/v0.3.0/cvmfs-config-eessi-0.3.0.pkg'
# run_local_checkout: 'true'
- name: Test EESSI
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: ./
# - name: Test EESSI
# run: |
# direnv status
# module avail
# shell: bash
- name: Test available repos
run: |
echo "This is only a placeholder until we figure out how to enable macOS support"
echo "if we fix it, make sure to edit the README to include the macOS badge"
echo "which is currently commented out"
ls /cvmfs/software.eessi.io
ls /cvmfs/dev.eessi.io
shell: bash
7 changes: 6 additions & 1 deletion .github/workflows/minimal-usage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ jobs:
minimal_usage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: ./
- name: Test EESSI
run: |
direnv status
module avail
shell: bash
- name: Test available repos
run: |
ls /cvmfs/software.eessi.io
ls /cvmfs/dev.eessi.io
shell: bash
16 changes: 6 additions & 10 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,20 @@

name: Scorecards supply-chain security
on:
# For Branch-Protection check. Only the default branch is supported. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
branch_protection_rule:
# To guarantee Maintained check is occasionally updated. See
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
schedule:
- cron: '25 15 * * 3'
push:
branches: [ "main" ]
pull_request:
branches:
branches:
- main

# Declare default permissions as read only.
permissions: read-all

jobs:
analysis:
if: github.repository_owner == 'EESSI' # Prevent running on forks
name: Scorecards analysis
runs-on: ubuntu-latest
permissions:
Expand All @@ -35,12 +31,12 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d # v2.0.6
uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -62,14 +58,14 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@807578363a7869ca324a79039e6db9c843e0e100 # v2.1.27
uses: github/codeql-action/upload-sarif@9fdb3e49720b44c48891d036bb502feb25684276 # v3.25.6
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/tensorflow-usage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
tensorflow_usage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: eessi/github-action-eessi@main
with:
eessi_stack_version: '2023.06'
Expand Down
45 changes: 31 additions & 14 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,45 @@ inputs:
description: 'Version of the EESSI stack to configure'
required: false
default: '2023.06'
eessi_repositories:
description: 'Comma-separated list of fully qualified repository names that shall be mountable under /cvmfs.'
required: false
default: 'software.eessi.io,dev.eessi.io'

runs:
using: "composite"
steps:
- uses: cvmfs-contrib/github-action-cvmfs@55899ca74cf78ab874bdf47f5a804e47c198743c # v4.0
- uses: cvmfs-contrib/github-action-cvmfs@cec5c94a14714ab02980682fce8ab3de238401f9 # v4.0 + MacOS support
with:
cvmfs_config_package: https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb
# Can't use config package for macOS but our repos are available with the default configuration anyway
# cvmfs_config_package: https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb
cvmfs_http_proxy: DIRECT
cvmfs_repositories: software.eessi.io
cvmfs_repositories: 'cvmfs-config.cern.ch,${{ inputs.eessi_repositories }}'
- id: install-eessi
run: |
echo "EESSI_SILENT=1" >> $GITHUB_ENV
echo 'unset BASH_ENV' >> $HOME/env_config.export
echo "source /cvmfs/software.eessi.io/versions/$EESSI_STACK_VERSION/init/bash" >> $HOME/env_config.export
sudo apt install -y direnv
echo 'eval "$(direnv export bash)"' >> $HOME/env_config.export
mkdir -p $HOME/direnv/
echo "[whitelist]" >> $HOME/direnv/direnv.toml
echo "prefix = [ '$GITHUB_WORKSPACE' ]" >> $HOME/direnv/direnv.toml
cp $HOME/direnv/direnv.toml $HOME/direnv/config.toml
echo "BASH_ENV=$HOME/env_config.export" >> $GITHUB_ENV
echo "DIRENV_CONFIG=$HOME/direnv" >> $GITHUB_ENV
if [ "$RUNNER_OS" == "Linux" ]; then
echo "EESSI_SILENT=1" >> $GITHUB_ENV
echo 'unset BASH_ENV' >> $HOME/env_config.export
echo "source /cvmfs/software.eessi.io/versions/$EESSI_STACK_VERSION/init/bash" >> $HOME/env_config.export
sudo apt install -y direnv
echo 'eval "$(direnv export bash)"' >> $HOME/env_config.export
mkdir -p $HOME/direnv/
echo "[whitelist]" >> $HOME/direnv/direnv.toml
echo "prefix = [ '$GITHUB_WORKSPACE' ]" >> $HOME/direnv/direnv.toml
cp $HOME/direnv/direnv.toml $HOME/direnv/config.toml
echo "BASH_ENV=$HOME/env_config.export" >> $GITHUB_ENV
echo "DIRENV_CONFIG=$HOME/direnv" >> $GITHUB_ENV
elif [ "$RUNNER_OS" == "macOS" ]; then
# EESSI on macOS requires lima so we get a Linux VM, see https://gitlab.com/eessi/support/-/issues/70
# (unfortunately this requires nested virtualisation in GitHub Actions which is not available with M1)
brew install lima
# limactl create --vm-type=vz --mount-type=virtiofs --network vzNAT --name eessi ./eessi.yaml
# limactl create --name eessi ./eessi.yaml
# limactl start eessi
## For debugging
# limactl start eessi || true
# cat /Users/runner/.lima/eessi/ha.stderr.log
fi
shell: bash
env:
EESSI_STACK_VERSION: ${{ inputs.eessi_stack_version }}