CI workflow tweaks #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build CSPICE Toolkit | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'cspice-sharedlib.sh' | |
- '.github/workflows/build.yml' | |
pull_request: | |
paths: | |
- 'cspice-sharedlib.sh' | |
- '.github/workflows/build.yml' | |
jobs: | |
build: | |
name: Test build and install | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install csh | |
run: sudo apt-get install csh | |
- name: Get CSPICE Toolkit | |
run: wget https://naif.jpl.nasa.gov/pub/naif/misc/toolkit_N0067/C/PC_Linux_GCC_64bit/packages/cspice.tar.Z | |
- name: Unpack CSPICE | |
run: tar -xf cspice.tar.Z | |
- name: Build CSPICE | |
env: | |
CFLAGS: -O2 | |
run: ./cspice-sharedlib.sh | |
- name: List library files | |
run: ls -l cspice/lib/ | |
- name: List executables | |
run: ls -l cspice/exe/ | |
- name: Install libraries in /usr/lib | |
run: sudo cp cspice/lib/* /usr/lib/ | |
- name: Install binaries in /usr/bin | |
run: sudo cp cspice/exe/* /usr/bin/ | |
- name: Install headers in /usr/include/cspice | |
run: | | |
sudo mkdir /usr/include/cspice | |
sudo cp cspice/include/* /usr/include/cspice/ | |